Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 5th, 2004, 09:20 AM
Authorized User
 
Join Date: Dec 2003
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Screen Resolution Sniffer - Can it be done in ASP?

Howdy, and thanks in advance for giving this some thought!

I'm wondering if there's some object or property that will tell me what the resolution on the webpage viewer's computer is....

I just want to have a simple If/Then that loads up some code if the viewer's comp is at 800x600 or less, otherwise, load up some other code...

Any ideas? If there isn't any way to do it in asp, is there a way to incorporate a javascript resolution sniffer into asp? (i.e., passing values into asp variables so that the asp logic knows what to load)...

Thanks!!!

Darin
 
Old May 5th, 2004, 01:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hope this is what you wanted. It is do-able using javascript.

Visit this link.
http://www.pcmag.com/article2/0,1759,72561,00.asp

Cheers!

-Vijay G
 
Old May 7th, 2004, 11:01 AM
Authorized User
 
Join Date: Dec 2003
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Vijay -

I guess what I found out was that I won't be able to do what I want, just based on the server-side nature of asp - I could use your script as a landing page, and then send a param to an asp page that would work the way I described, but there's no way to do res sniffing in asp, and while with javascript, the res can be sniffed, there's no way to pass the param to asp without reloading/refreshing/redirecting to an asp page...

Guess it's time for a redesign of the page that doesn't require resolution sniffing!! :)

Thanks!

Darin






Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.net web forms and screen resolution kulkarnimonica ASP.NET 2.0 Professional 4 July 25th, 2007 09:22 PM
Screen Resolution ajeesh_online C# 1 June 14th, 2006 12:37 AM
screen resolution Adam H-W Classic ASP Basics 3 October 13th, 2004 09:13 PM
screen resolution miguel.ossa C# 2 October 9th, 2004 11:58 PM
screen resolution mistry_bhavin Pro VB.NET 2002/2003 0 March 13th, 2004 02:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.