javascript_howto thread: Table width??
What you should try is the getElementById. I would suggest this approach:
document.getElementById("table").style.width=maxWidth
OR you could also try this (if the above doesn't work)
document.getElementById("table").setAttribute("width",maxWidth)
Please note that this method is not supported by all browsers. I think
it's supported in IE and Netscape 7.0+, but I am not sure.
If you don't have to do this on the fly, you can do this:
document.write('<table width="' + maxWidth + '">blah</table>')
|





