IE8 appendChild to XML issue: Type Mismatch

microbit

New Member
I am working on an xml using jquery and javascript. I import xml using ajax then i want to manipulate it, appendChild is a problem in IE8.This is the Javascript:\[code\]// How i get xml $.ajax({ url: production_get, dataType: "xml", success: function(data) { input_xml=data; }});// how i try to append a new node to new_user_node = document.createElement('user');new_user_node.setAttribute('id',new_user_id);new_user_node.setAttribute('label',new_user_label); response=$(input_xml)[0].getElementsByTagName("response")[0];response.appendChild(new_user_node); // <- type mismatch\[/code\]XML markup\[code\]<response> <user id="123" label="John" /></response>\[/code\]This works great in all browser but IE that reports: Type Mismatch. I have to say it works even in IE8 but console reports the error, while in IE7 the error popup appears
 
Back
Top