DelphiFAQ Home Search:

Obtain screen and current window size in VBScript

 

comments7 comments. Current rating: 4 stars (5 votes). Leave comments and/ or rate it.

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>

Content-type: text/html

Comments:

2006-07-25, 08:18:51
anonymous from United States  
rating
Thanks for the help!
Looking for this exact code.
2007-04-09, 00:30:39
anonymous from India  
rating
need more details


Keywords: vbscript object model
2007-04-23, 11:11:09
anonymous from United States  
Gentlemen:
I believe that it stinks...the fact that you have taken you telephone number away from your custmers viewing...can find help/customer service numbers anywhere anymore! What do you have to say about that...additionally, why do I NEVER receive any answers when I try to communicate with you via Email??? Sure would be nice to receive a meaningful answer to this one...or would you rather continue doing nothing to assist your customers...like me, a five year customer! cajim1@msn.com

Jim Huddleston, April 23, 2007
2011-10-28, 12:17:21
anonymous from United States  
rating
Thanks, this was very helpfull.
2013-02-10, 08:12:37
 
rating
uhlklntz <a href=' http://buyviagrate.com/ '>buy viagra soft online</a> >:-[ <a href=' http://buycialiste.com/ '>buy cialis online</a> 1806
2013-02-20, 21:39:08
 
rating
pfpeboe <a href=' http://orderviagrafsb.com/ '>how to order viagra</a> vRBaMZ <a href=' http://ordercialisfsb.com/ '>order cialis</a> 0850
2014-12-26, 02:39:39
anonymous  
Hey Andrea.The thing is that Google Adsence was not intended to be ozeimiptd. It is just compressed with that Javascript Compressor, so there is a feeling like stuff is ozeimiptd but not to the end.I have made a dig into source code and uncompressed it. But then I found original code in open sources. I can find a link if you wish.

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: