Netscape hangs on refresh

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 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top