Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Don't place form tags inside each jsp page (abc.js , def.jsp) and handle submit event of form1 in the tabs page ..</p> <p>You will need to place the submit button in jsp page of last tab . </p> <pre><code>&lt;!doctype html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;title&gt; &lt;/title&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /&gt; &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt; &lt;script&gt; $(function () { $("#tabs").tabs({ beforeLoad: function (event, ui) { ui.jqXHR.error(function () { ui.panel.html("Couldn't load this tab."); }); } }); // handle submit of each form $('#form1').submit( function (e) { var form = $(this); e.preventDefault(); $.ajax({ url: form.attr('action') , type: form.attr('method') , data: form.serialize() , success: function (data) { alert(data); } , error: function (jqXHR, textStatus, errorThrown) { alert('Error:' + textStatus + ' - ' + errorThrown) } }); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="form1" method="post" class="main" action="myservlet"&gt; &lt;div id="tabs"&gt; &lt;ul&gt; &lt;li&gt; &lt;a href="1.htm"&gt; Tab 1&lt;/a&gt;&lt;/li&gt; &lt;li&gt; &lt;a href="2.htm"&gt; Tab 2&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>each form tag should have method and action attributes set correctly !</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload