Note that there are some explanatory texts on larger screens.

plurals
  1. POAjax content getting loaded multiple times with JQuery UI Tabs
    primarykey
    data
    text
    <p>Hi I am basically calling individual php pages (and their forms) via AJAX in separate JQueryUI tabs. The code is something like:</p> <pre><code>&lt;div id="dock"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="/buddylity_dev/index.php?r=welcome/home"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/buddylity_dev/index.php?r=welcome/profile"&gt;Profile&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/buddylity_dev/index.php?r=welcome/statistics"&gt;Statistics&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/buddylity_dev/index.php?r=ping/view"&gt;Pings&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; ... jQuery(function($) { jQuery('#dock').tabs({'collapsible':false}); }); </code></pre> <p>1) Now every time I click on the tabs, their content gets loaded fine but the previous content does not get destroyed. As a result, imagine if a tab was clicked (loaded) N times - a form is also submitted N times. As far as I have understood, multiple bindings occurs here and hence the multiple form submits. How can I prevent this?</p> <p>2) I have separate forms in each tab. When multiple tabs are selected, multiple forms get loaded. Now if I submit a value (via AJAX) in any one of the form, the data is submitted across all the forms which were previously loaded (Checked with Firebug). How can I prevent this again ?</p> <p>PS: Enabling caching in tabs partially solved problem #1, but does not help with problem #2.</p> <p>PPS: I went through quite a few similar posts but I am still stuck :(</p> <p>Thanks !</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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