Previous Message
Next Message

Re: [css-d] javascript style switcher

Sent by Duncan O'Neill on 30 April 2002 17:05


> document.all.DIVNAME.style.display = "none";
> 
> (replace DIVNAME with the name of the div that is to be affected)
> 
> 
> This works great in IE 5 for OSX and OS9, and IE 6 in windows, but I 
> can't get it to work in mozilla. Is there a better way to do this that 
> is more cross platform?


Jason,

if you want it to work cross-browser, there are three 
document object models (DOMs) you need to fork 
code for;

document.layers  - NN4.x
document.all       -  IE4+
document.getElementById  - W3C, Moz, N6, etc

a fuller, and better, explanation, can be found here;
http://www.xs4all.nl/~ppk/js/index.html

hth,

Duncan O'Neill
http://homepages.ihug.co.nz/~dbaxo/urban_legend.htm
========================================
Previous Message
Next Message

Message thread:

Possibly related: