Forum Moderators: open
screen.availWidth, and screen.availHeight show you the size of the display that is not consumed by permanent fixtures of the browser and operating system, such as menus or Task Bars.
These four properties (and others) are available on both IE and Netscape browsers. The screen object is documented at:
Microsoft Reference [msdn.microsoft.com]
and
Netscape Reference [developer.netscape.com].
If you want WINDOW measurements instead of SCREEN measurements, it gets a bit trickier and browser specific.
In Netscape --
window.innerWidth and window.innerHeight do the job.
And in Explorer, it's --
document.body.clientWidth and document.body.clientHeight. However, the script accessing these IE properties cannot execute until after the body is rendered, i.e. trigger your code with the onLoad event handler in the body tag.
More specifically, How can the VBSript running on the Server, take a variable from JavaScript running on the client? I don't see the path when they are running on the same page.
THanks,
How can the VBSript running on the Server, take a variable from JavaScript running on the client?
It can't really though there are tricks. The thing is that VBScript runs BEFORE the page is sent to the client's browser, and javascript runs after (see the problem?).
One thing you can do, if it's not something that needs to be done right away on that page, is you can have the javascript write the variable into a hidden form field, and when the user processes that form, the values generated by the Javascript in the previous script are then passed and can be used later. It's a cheap way of doing it, but I really don't see a reason why you'd need javascript parameters to be passed that way.
Often, things you do in Javascript can be done more safely in ASP.