DelphiFAQ Home Search:
General :: Programming :: VBScript
Solutions for your VBScript related questions.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

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>

Generated 12:01:58 on Sep 19, 2017