Moo
07-03-2002, 10:24 AM
Does anyone know how to find the width of the browser window that the page is in. i.e., when a page is loaded I want to intialise a variable with the value of the width of the windowit's in.
Thanks
Thanks
|
||||
Getting the width of the current windowMoo 07-03-2002, 10:24 AM Does anyone know how to find the width of the browser window that the page is in. i.e., when a page is loaded I want to intialise a variable with the value of the width of the windowit's in. Thanks Zvona 07-03-2002, 10:39 AM <script type="text/javascript"> window.onload = function() { var iWidth = (document.all)?document.body.clientWidth:window.innerWidth; alert(iWidth); } </script> Moo 07-03-2002, 10:50 AM Thanks. |
| |||
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum