I have a very simple test JQuery Ajax demo that for some reason fails in IE (all versions) after the first click. The first click works, but after that it sends out no additional XMLHttpRequests.
Expected results: click the link containing a person's name and that fires off $.get() to retrieve a new name in plain text from a php script. The link innerHTML will then be updated with the new name.
Observed results: All browsers work fine but Internet Explorer (v5.x/6/7), which works only for the first click, then fails.
Here is the code I'm using (assume a standard XHTML page containing one link element, id="name"):
The script is contained within an external _javascript_ file. I am using the latest version of JQuery.
Expected results: click the link containing a person's name and that fires off $.get() to retrieve a new name in plain text from a php script. The link innerHTML will then be updated with the new name.
Observed results: All browsers work fine but Internet Explorer (v5.x/6/7), which works only for the first click, then fails.
Here is the code I'm using (assume a standard XHTML page containing one link element, id="name"):
| Code: |
| $(document).ready(init); function init(){ $('#name').bind('click', getNewName, false); } function getNewName(e) { $('#name').html(' $.get( 'get/?name', function(txt){ $('#name').html(txt); } ); return false; } |
The script is contained within an external _javascript_ file. I am using the latest version of JQuery.
-------------------- m2f --------------------
Permalink to this post:
http://proj.jquery.com/forum/viewtopic.php?p=9531#9531
-------------------- m2f --------------------
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
