
October 2nd, 2004
12:14 PM
document.all.id.class
i want to change something in the onMouseOver event, but to do that, i need to get the js thing for the cell id, now, i thought it would be document.all.mnuhome.class='menuon' but that doesnt do nething, any thoughts??
thnx in advance...justin

October 3rd, 2004
02:02 PM
Firstly, document.all is bad stuff. It's Microsoft-introduced garbage. Use document.getElementById to access document nodes. Secondly, you'll want to use className since class is a resevered word in JavaScript. Thus making your statement:
document.getElementById('mnuhome').className = 'menuon';
However, it seems you're going about this the wrong way. I have a strange feeling the CSS :hover pseudo-class would be much more suitable for what you're doing, but I'd have to see in what context this JavaScript is being used in.
___________________
