function ShowSubmenu(evt)
{
e=window.event||evt;
var submenu=document.getElementById(e.srcElement.submenuid);
window.alert(submenu.style.display);
submenu.style.display='table';
}
The window.alert successfully shows the current value of the CSS display
property, but when I attempt to assign a new value to it I recieve the
following error:
"Could not get the display property. Invalid argument."
What is the problem here? Any help would be appreciated. Thanks.
--
Nathan Sokalski
njsok...@hotmail.com
http://www.nathansokalski.com/
Which browser is that? I think IE before IE 8 does not know the display
value 'table':
http://msdn.microsoft.com/en-us/library/ms530751(VS.85).aspx
A workaround for such problems is usually simply to let the browser
choose the default it has e.g. if you have
<table id="t1" style="display: none;">...</table>
then setting e.g.
document.getElementById('t1').style.display = '';
will erase the inline style for display and that way the browser simply
uses the value defined in its browser stylesheet for that element.
--
Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/