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


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


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?


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>"

Generated 20:01:58 on Oct 23, 2020