A
Amit
Hi,
I have the following javascript code in my ASP.net page which I am
using to read and parse XML from my server in order to create a
javascript based menu. However, I have observed that the Netscape
browser hangs if I refresh the page using Ctrl-R or F5 but works fine
if I navigate to other pages. I have identified the problem to be
occurring in the lines of code where we create a document object and
read XML . Here's the code for your reference:
xmlDoc=document.implementation.createDocument("","",null);
xmlDoc.async=false;
xmlDoc.load("Menu.xml");
var nodes = xmlDoc.getElementsByTagName("record");
and here's the XML used:
<Root>
<record>
<MenuNumber>1</MenuNumber>
<TextToShow>Master Maintenance</TextToShow>
<Link>javascript:blankLink()</Link>
<NumberOfSubElements>9</NumberOfSubElements>
</record>
</Root>
In IE, I am using the following code to parse the xml which works fine
even on refresh
var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("../Scripts/MenuScripts/Menu.xml");
In Netscape, is there any other way of reading and parsing the xml
document instead of using document.implementation.createDocument ?
I have the following javascript code in my ASP.net page which I am
using to read and parse XML from my server in order to create a
javascript based menu. However, I have observed that the Netscape
browser hangs if I refresh the page using Ctrl-R or F5 but works fine
if I navigate to other pages. I have identified the problem to be
occurring in the lines of code where we create a document object and
read XML . Here's the code for your reference:
xmlDoc=document.implementation.createDocument("","",null);
xmlDoc.async=false;
xmlDoc.load("Menu.xml");
var nodes = xmlDoc.getElementsByTagName("record");
and here's the XML used:
<Root>
<record>
<MenuNumber>1</MenuNumber>
<TextToShow>Master Maintenance</TextToShow>
<Link>javascript:blankLink()</Link>
<NumberOfSubElements>9</NumberOfSubElements>
</record>
</Root>
In IE, I am using the following code to parse the xml which works fine
even on refresh
var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("../Scripts/MenuScripts/Menu.xml");
In Netscape, is there any other way of reading and parsing the xml
document instead of using document.implementation.createDocument ?