Print Page | Close Window

Screen resolution

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3576
Printed Date: 30 March 2026 at 9:38am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Screen resolution
Posted By: Mc Brain
Subject: Screen resolution
Date Posted: 16 June 2003 at 8:55am

I'm creating a page that would show a lot of thumbnails on a table. The problem is that I'm creating a 5x5 table's photo and it's too wide if the resolution is 800x600. I mean, the 5-thumbnails row is too wide and the horizontal scrollbar appears.

The ASP's code has these values (number of thb by column and row) as variables, so it would be easy to fix this. The question is... how do I get the screen resolution to decide how many thumbnails should be shown in each row?




Replies:
Posted By: Mart
Date Posted: 16 June 2003 at 10:21am

You can use Browserhawk ( http://www.cyscape.com - www.cyscape.com ) to detect the screen resolution serverside or theres some javascripts to do it client side ( http://www.dynamicdrive.com - www.dynamicdrive.com ).

Hope that helps, Mart



Posted By: Mc Brain
Date Posted: 16 June 2003 at 8:46pm

3rd Parties objects are not a solution... because I'm not asking my ISP to install it (I have enough problem with regular hosting to have more things to claim.)

On the other hand... I would need the screen resolution in VBScript... or at least be able to return the value to VBScript so that I can use the code I've already have.



Posted By: Gullanian
Date Posted: 17 June 2003 at 1:00am
Use Javascript


Posted By: ljamal
Date Posted: 17 June 2003 at 1:46am
The problem with detecting resolution is that it assumes the user maximizes the browser. What you really want is the window size and for that you will need to use Javascript. My suggestion would be to use Javascript to write the window size to a cookie (before you need to display the thumb nails) and then retrieve the value from the cookie.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: Mc Brain
Date Posted: 17 June 2003 at 4:27am
Do you have any Java sample to show me?


Posted By: Mart
Date Posted: 17 June 2003 at 9:17am
Java or javascript?


Posted By: Mc Brain
Date Posted: 17 June 2003 at 10:04am
I don't know. Anyone that works.


Posted By: Gullanian
Date Posted: 17 June 2003 at 11:56am
You would want javascript


Posted By: Mc Brain
Date Posted: 17 June 2003 at 5:25pm
Originally posted by Gullanian Gullanian wrote:

You would want javascript
I believe you... do you have any javascript example to show me?


Posted By: zMaestro
Date Posted: 18 June 2003 at 5:44am

This will work:

< script >document.write(' < input type="text" name="Display" value="'+screen.width+'*'+screen.height+' - '+screen.ColorDepth+' bit - '+screen.pixelDepth+' Pix - '+Math.pow (2, window.screen.colorDepth)+' colors" >')< /script >

It doesn't only bring screen width and hight, but colors too...
take care i put spaces before the tags, since it may make problems in the page




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net