Entry
How can I change the display element of an attribute?
Apr 2nd, 2000 06:13
Martin Honnen, Nathan Wallace, Martin Honnen
NN4 doesn't allow you to change the display attribute of an element with
javascript.
In IE4+ you can use:
document.all['elementID'].style.display = 'none'/'inline'/'block'
With NN6 you can use
document.getElementById('elementID').style.display =
'none'/'inline'/'block'
Taken together you can script
var el =
document.all ? document.all['elementID'] :
document.getElementById ? document.getElementById('elementID') :
null;
if (el)
el.style.display = 'none'/'inline'/'block'