Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery , Ajax and Live Function issues
    primarykey
    data
    text
    <p>I'm aware that if you load a div within a page with form elements using ajax, then you gotta use the live function to add events to those elements that were not in the dom tree....</p> <p>And also I read in the jQuery website that live function does not currently support focus, blur etc....</p> <p>What should I do to invoke a function when an element loaded into a div through ajax is focused or blurred...?</p> <p>Is it something that should be done with bind...? but talking about bind, even though live and bind looks a little alike, it can't be used in the above mentioned scenario... right...?</p> <p>and here goes the code....</p> <pre><code>&lt;BODY style=""&gt; &lt;div style="margin-top:5px; width:100%" class="subAndContent" id="subAndContent"&gt; &lt;!-- TABLE TO HOLD SUB MENU--&gt; &lt;div id="subMenuDiv"&gt; &lt;table width="100%" &gt; &lt;tr align="center" valign="middle"&gt; &lt;td width="100%" valign="middle" class="rounded" &gt; &lt;div class="sidebarmenu"&gt; &lt;ul id="sidebarmenu1"&gt; &lt;li&gt; &lt;a href="javascript:ajaxLoadMainOnly('createHotel.php', 'content')" &gt; &lt;!-- This function get's the page to be loaded and the div into which it should be loaded and uses ajax to do the loading... --&gt; HOTEL &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="javascript:ajaxLoadMainOnly('createCountry.php', 'content')" &gt; COUNTRY &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="javascript:ajaxLoadMainOnly('createCity.php', 'content')"&gt; CITY &lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;!-- END TABLE TO HOLD SUB MENU--&gt; &lt;/div&gt; &lt;div id="contentDiv" class="rounded"&gt; &lt;!-- TABLE TO HOLD CONTENT PANE--&gt; &lt;table width="100%" style="float:left;"&gt; &lt;tr valign="left"&gt; &lt;td align="center"&gt; &lt;div id ="content"&gt; &lt;!-- Div into which the content will be loaded --&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- DIV AND TABLE TO HOLD FOOTER --&gt; &lt;?php include 'footer.php'; ?&gt; &lt;/BODY&gt; </code></pre>
    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.
 

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