Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting screen resolution with ASP

Status
Not open for further replies.

chappi

Technical User
Aug 29, 2001
42
US
Hi...

I created a site that requires me to do certain things depending on the screen resolution. Unfortunately I could not find a way to do so with Javascript because I need to assign values to my ASP variables.

Any help is really appreciated.

J~
 
You cant with ASP, either use javascript at the client side or run a page that resubmits itself passing the javascript variables back so you have them at the server side- but thats a very messy way of doing it.

 
Thanks. I realized that myself that it gets pretty messy, especially if you have hundreds of pages :)

Any way of storing javascript values into ASP variables?
 
you'll need to get them
screen.width and such and send them back to the server in some event


_____________________________________________________________________
[sub]Where have all my friends gone to????[/sub]
onpnt2.gif

 
ASP is a server side scripting language i.e. it knows nothing about the client. You can use Javascript client side to get info about the browser, and resolution etc. The two dont work together (well actually you can pass ASP variables in Javascript). You would have to visit the client get the info and then go back to the server before you could use variables from the client side.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top