[thelist] Netscape 6 and javascript

Zhang, Lingling lingz at cs.umd.edu
Fri Feb 6 21:57:42 CST 2004


Hi,
 
It seems my Netscape 6.2 doesn't recognize javascript code, although I turned on
the "enable javascript" option. 
 
So here's my code:
 
In .asp file, I have: 
 
<SCRIPT language=JavaScript src="func.js">document.write
document.all[id];</SCRIPT>
...
<body onresize="if (isNS4) nsResizeHandler()" style="MARGIN: 0px"
onload="writeMenus();" ...>
...
 
In func.js file, I have:
 
function writeMenus() {
            alert("write menus");
            if (!isDOM && !isIE4 && !isNS4) return;
...
}
 
When I tested in Netscape 6.2, the alert message didn't show up, and the menu
didn't get written. And there's no error either.
 
Also, I used the following statements to tell if a browser is Netscape or IE or
if they support DOM:
 
var isDOM = (document.getElementById ? true : false); 
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
 
Can someone please tell me what's wrong here? 
 
Thank you for your help,
Lingling
 


More information about the thelist mailing list