I use the script below to control the maximum-width of a table. It works fine in IE and Netscape 7.1
/* Restrict growth of element on very-wide displays */
function resizeBox(){
sObj = document.getElementById("container"
if ( sObj ) {
if(document.body.clientWidth) (document.body.clientWidth>1024) ? sObj.style.width = "955px" : sObj.style.width = "100%"
}
}
window.onload = resizeBox;
window.onresize = resizeBox;
--------------------------------------
<table id="container">
In Netscape 4.7, no error appears, and I belive the JavaScript is running correctly. But it changes the TABLE element's style so the width is held to 1024 pixels.
It's like a no-op in Netscape 4.7.
Is there some other style or element attribute that I should try?
Sam
/* Restrict growth of element on very-wide displays */
function resizeBox(){
sObj = document.getElementById("container"
if ( sObj ) {
if(document.body.clientWidth) (document.body.clientWidth>1024) ? sObj.style.width = "955px" : sObj.style.width = "100%"
}
}
window.onload = resizeBox;
window.onresize = resizeBox;
--------------------------------------
<table id="container">
In Netscape 4.7, no error appears, and I belive the JavaScript is running correctly. But it changes the TABLE element's style so the width is held to 1024 pixels.
It's like a no-op in Netscape 4.7.
Is there some other style or element attribute that I should try?
Sam