javascript - Internet Explorer 11 (IE 11) Throws Syntax Error using parseFromString in DOMParser -


i have javascript on webpage works fine in chrome , firefox; when testing in ie 11 fails. viewed problem in ie 11 debug tools (f12) , following code @ fault; when using parsefromstring 'syntax error' thrown:

if (window.domparser) {                                 parser =  new domparser();     tmp = parser.parsefromstring(resp, "text/xml"); } 

any way can work around this?

for ie works me

xmldoc=new activexobject("microsoft.xmldom"); xmldoc.async=false; xmldoc.loadxml(text); 

source: http://www.w3schools.com/dom/dom_parser.asp


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -