Coders' Corner Search:
General :: Web publishing :: VBScript
Solutions for your VBScript related questions.

Articles:


Featured Article

Obtain screen and current window size in VBScript

Question:

I want to adjust my web page's controls to the browser window size. How can I find the size of the browser's window?

Answer:

VBScript has the screen variable with properties height and width. Use document.body.clientWidth and document.body.clientHeight for the viewable size.

<script language="VBScript">
 <!--
 document.write ("<p>VBScript is enabled and working.<p>")
 document.write "Your screen width is : " & screen.width & " pixels<br>"
 document.write "Your screen height is : " & screen.height & " pixels<br>"
 document.write "Your viewable Width is : " & document.body.clientWidth 
 document.write " pixels<br>"
 document.write "Your viewable Height is : " & document.body.clientHeight 
 document.write " pixels<br>"
 -->
 </script>