Javascript, XML and Mozilla

admin

Administrator
Staff member
Here's the problem:
I am developing a html page with an xml data island. I call an external xml file into a dynamically updated html table. It works fine in IE6. However the data stored in the xml file doesn't go into the table if I use Mozilla Firefox (and I assume Netscape Navigator).

My boss said that he only wants to support IE5,6 (poo on him). So I wrote a little javascript that detects users' browser and warns them to use IE. How would I get it to recognize IE, and not give any warning, yet warn anyone using any other browser to use IE? Here's what I have so far, but I am a bit stuck:

<head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>OCS</title>
<SCRIPT language="JavaScript">
<!--
var browserName=navigator.appName;
if (browserName=="Netscape")
{
alert("Netscape/Mozilla User: Please note that you must use Microsoft Internet Explorer 5 or up to view this page correctly");
}
else
{
alert("Please use Microsoft Internet Explorer 5 or up to view page correctly");
}
}
//-->
</SCRIPT>
</head>

I realize that not everyone has javascript enabled, but this is what the boss wants...
 
Back
Top