Loading Xml using Javascript -Safari Browser
-
I am Loading Xml file using javascript. Its working fine in IE and Firefox but Its not working safari. This is My code. if( window.ActiveXObject && /Win/.test(navigator.userAgent) ) { LoadXml = new ActiveXObject("Msxml.DOMDocument"); LoadXml.async = false; LoadXml.onreadystatechange = function () { if (LoadXml.readyState == 4) ManipulateXML(Id); } LoadXml.load("../../Common_Inc/link.xml"); } else if( document.implementation && document.implementation.createDocument ) { LoadXml = document.implementation.createDocument("","",null); //LoadXml = new ActiveXObject("Microsoft.XMLHTTP"); LoadXml.async = false; var loaded = LoadXml.load("../../Common_Inc/link.xml"); moz=1; if (loaded) { ManipulateXML(Id); } //alert("Test13"); } else { alert("Your browser can\'t handle this script"); return; } Im getting Error in safari Browser while loading the Xml file. Do u know any Alternate methods which is working in all browser ?
Cheers..! Vijay s
-
I am Loading Xml file using javascript. Its working fine in IE and Firefox but Its not working safari. This is My code. if( window.ActiveXObject && /Win/.test(navigator.userAgent) ) { LoadXml = new ActiveXObject("Msxml.DOMDocument"); LoadXml.async = false; LoadXml.onreadystatechange = function () { if (LoadXml.readyState == 4) ManipulateXML(Id); } LoadXml.load("../../Common_Inc/link.xml"); } else if( document.implementation && document.implementation.createDocument ) { LoadXml = document.implementation.createDocument("","",null); //LoadXml = new ActiveXObject("Microsoft.XMLHTTP"); LoadXml.async = false; var loaded = LoadXml.load("../../Common_Inc/link.xml"); moz=1; if (loaded) { ManipulateXML(Id); } //alert("Test13"); } else { alert("Your browser can\'t handle this script"); return; } Im getting Error in safari Browser while loading the Xml file. Do u know any Alternate methods which is working in all browser ?
Cheers..! Vijay s
Vijayitsb wrote:
Do u know any Alternate methods which is working in all browser ?
Yeah: http://developer.apple.com/internet/webcontent/xmlhttpreq.html[^]
Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'