jQuery 1.3 AJAX-ing xml - works in Firefox, but not IE8

Nakamura00

New Member
I am populating the xml contents in selection element of html using jquery ajax.Code works fine in firefox but no result in IE8; the list does not populate. can any one resolve this problem?\[code\] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script type="text/javascript">\[/code\]Problem is here.............\[code\] $(document).ready(function(){ $.ajax({ type: "GET", url: "dropdown.xml", dataType: "xml", success: function(xml) { $(xml).find('menuitem').each(function(){ var title = $(this).find('title').text(); var selection = $('#'+title); $(this).find('value').each(function(){ var value = http://stackoverflow.com/questions/11208512/$(this).text(); selection.append("<option value='"+ value +"'>"+value+"</option>"); selection.children(":first").text("please make a selection").attr("selected",true); }); }); } }); });\[/code\]now from here there is plain html......so no issues\[code\] </script> <title>Using XML to populate a drop-down box</title> </head> <body> <br> Select Gender : <select id="Gender"> <option>loading</option> </select> <br> <br> Select Salutation : <select id="Salutation"> <option>loading</option> </select> <br> <br> Select Blood Group : <select id="Bloodgroup"> <option>loading</option> </select> </body> </html>\[/code\]
 
Back
Top