| | |
jQuery XML manipulation NOT WORKING in Internet Explorer
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2008
Posts: 99
Reputation:
Solved Threads: 5
Hello,
I manipulate XML with jQuery with no problem in all browseres but not in Internet Explorer. I serched bug-fix and I found "metadata.js" but still not working in my Internet Explorer 7
.
Does anyone now a fix for this problem? It's just too nice to manipulate XML with jQuery...
As a matter of fact... a simple example of extracting some data:
Script page:
labels.xml file:
Code works perfectly in all browsers except IE (Internet Explorer - "failing forever". Good job MS
)
I manipulate XML with jQuery with no problem in all browseres but not in Internet Explorer. I serched bug-fix and I found "metadata.js" but still not working in my Internet Explorer 7
.Does anyone now a fix for this problem? It's just too nice to manipulate XML with jQuery...
As a matter of fact... a simple example of extracting some data:
Script page:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<!DOCTYPE html PUBLIC "-//W3C// DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <title>Address book</title> <script src="jquery.js" type="text/javascript"></script> <script src="metadata.js" type="text/javascript"></script> <script type="application/javascript"> $(function() { $('#update-target a').click(function() { $.ajax({ type: "GET", url: "labels.xml", dataType: "xml", success: function(xml) { $(xml).find('label').each(function(){ var id_text = $(this).attr('id') var name_text = $(this).find('name').text() $('<li></li>') .html(name_text + ' (' + id_text + ')') .appendTo('#update-target ol'); }); //close each( } }); //close $.ajax( }); //close click( }); //close $( </script> </head> <body> <p> <div id='update-target'> <a href="#">Click here to load addresses</a> <ol></ol> </div> </p> </body> </html>
labels.xml file:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<?xml version="1.0" encoding="iso-8859-1"?> <labels> <label id='ep' added="2003-06-10"> <name>Ezra Pound</name> <address> <street>45 Usura Place</street> <city>Hailey</city> <province>ID</province> </address> </label> <label id='tse' added="2003-06-20"> <name>Thomas Eliot</name> <address> <street>3 Prufrock Lane</street> <city>Stamford</city> <province>CT</province> </address> </label> <label id="lh" added="2004-11-01"> <name>Langston Hughes</name> <address> <street>10 Bridge Tunnel</street> <city>Harlem</city> <province>NY</province> </address> </label> <label id="co" added="2004-11-15"> <name>Christopher Okigbo</name> <address> <street>7 Heaven's Gate</street> <city>Idoto</city> <province>Anambra</province> </address> </label> </labels>
Code works perfectly in all browsers except IE (Internet Explorer - "failing forever". Good job MS
) ![]() |
Similar Threads
- prototype - internet explorer problem ? (JavaScript / DHTML / AJAX)
- Internet explorer (Windows Software)
- javascript:window.open not working for internet explorer (PHP)
- internet explorer cannot display the webpage (Windows NT / 2000 / XP)
- JavaScript not working in Internet Explorer 7 (JavaScript / DHTML / AJAX)
- Internet Explorer not working. (Web Browsers)
- On Internet Explorer, My Java does not work! (Web Browsers)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: boxes
- Next Thread: Dynamic drop down list not working
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array beta box browser captcha captchaformproblem cart child close codes column css date debugger decimal dependent design disablefirebug dom download element embed engine enter error events ext file firefox focus form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html ie7 ie8 iframe index java javascript javascripthelp2020 jquery jsp jump libcurl listbox maps masterpage math media menu mimic mp4 onerror onmouseoutdivproblem onmouseover onreadystatechange paypal pdf php position post problem programming prototype rated rating redirect safari scale scriptlets scroll search security select software star starrating synchronous toggle unicode variables w3c web webservice window windowofwords xml \n





