[SOLVED] Finding client screen resolution

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Vash the Stampede
Forum Newbie
Posts: 7
Joined: Tue Mar 30, 2004 6:15 pm

Finding client screen resolution

Post by Vash the Stampede »

I was wandering if there is a way to find the clients screen resolution when they connect to your site? I was going to try to have my site ajust some images depending on their srceen resolution, like 1024x768, 800x600 and so on. Thanks
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

http://www.phpbuddy.com/article.php?id=8 might help (not really looked at it myself, but the topic seems right ;))
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Code: Select all

alert(screen.width+'x'+screen.height);
User avatar
Vash the Stampede
Forum Newbie
Posts: 7
Joined: Tue Mar 30, 2004 6:15 pm

Post by Vash the Stampede »

Thanks guys, I had completly forgot that php is server side and that I would have to use a client side lang. like javascript. :D
Post Reply