[Javascript] script no go

Schalk Neethling schalk at volume4.com
Sun Aug 7 10:14:37 CDT 2005


Greetings all

Please have a look at the following code:

function startList() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}

I call this code as follows:
<script type="text/javascript" 
src="javascript/global.js">window.onload=startList;</script>

In IE it is supposed to mimic the :hover pseudo class but, as of now 
nothing happens. No errors are thrown either. Can anyone see why this 
code will not execute? Thank you in advance.

-- 
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers
emotionalize.conceptualize.visualize.realize
Landlines
Tel: +27125468436
Fax: +27125468436
Web
email:schalk at volume4.com
Global: www.volume4.com
Messenger
Yahoo!: v_olume4
AOL: v0lume4
MSN: volume4_ at hotmail.com

We support OpenSource
Get Firefox!- The browser reloaded - http://www.mozilla.org/products/firefox/
 
This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you.





More information about the Javascript mailing list