Nevermind, ignore what I said, Bert is right. Although IE may misbehave as well, it seems pretty inconsitent and buggy.
On Tue, 2005-12-06 at 09:21 +0800, Bert Doorn wrote: > G'day > > > I was having some trouble finding out why, whenever I call for > > document.getElementById(id), it returns null (even if there is a valid > > id-matching element). Consider something simple, like this: > > The javascript runs as the page loads. At that point, the > elements with the ids do not yet exist in the DOM tree (as they > are still to be loaded). You'll need to delay the script until > the page has loaded. Something like: > > function init() { > var toggle = document.getElementById('toggle'); > var onoff = document.getElementById('onoff'); > toggle.onmouseover = function() { > onoff.style.display = "block" > } > toggle.onmouseout = function() { > onoff.style.display = "none" > } > } > window.onload=init; > > > Regards __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************