José Joye wrote:
> I'm trying to update the size of a layer within my page as soon as the
> window is resized. I look at the Jscript ref guide. However, I keep
> receiving error when executing the script fired at window resize
> (f_resize_bottom()). It tells me that document.layers["layer_bottom"] is
> null or not an object.
document.layers is part of the Netscape 4 object model, that object
doesn't exist in recent Netscape versions (6/7) and neither in any IE
version.
If you want to change the CSS inline settings of an element with a
certain id with IE5+, Netscape 6/7, Opera 7 and other browsers
implementing the W3C DOM try
var element;
if (document.getElementById) {
element = document.getElementById('elementId');
if (element && element.style) {
element.style.width = 440 + 'px';
}
}
As for the body onresize to change the width that shouldn't be necessary
at all if you use static CSS to set
width: 100%;
--
Martin Honnen
http://JavaScript.FAQTs.com/