hwg-style archives | Feb 2001 | new search | results | previous | next |
Netscape says variable not defined?by Ed Lazor <osmosis(at)atfantasy.com> |
|
Netscape's reporting an error that doesn't make sense: "line 26: anch is not defined". The page in question has a javascript that defines the value of the variable in a javascript. It doesn't make any sense, because the variable is defined a few lines before the error is generated. Here's the function generating the error: function getAnch(n) { if (NS4) { for (i=0;i<document.anchors.length;i++) { anch = document.anchors[i]; if(anch.name == n) break; } menX = anch.x; menY = anch.y; } if (IE4) { menX = tbAnch.offsetLeft; menY = tbAnch.offsetTop; } return [menX,menY]; } The web page itself is located at: http://portal.atfantasy.com/includes/hm4_4/LoadMe.html Internet Explorer renders the page accurately and I'm not sure why Netscape generates the error. Could you take a look at it and let me know what the problem is? Thanks! =) -Ed osmosis(at)atfantasy.com
HWG hwg-style mailing list archives, maintained by Webmasters @ IWA