TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-27-2009, 05:37 PM   #1 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default Accessing screen-resolution?

Hey!

I asked this before, and you said javascript: screen.width & screen.height.

Problem is, this doesn't really work the way I want.
You see, I have a big screen so it says 1440 in width. Now, that's great.

However, that's not what I meant by screen resolution. That's more.. screen size. I can "zoom" on websites to make them bigger, and THAT'S the resolution I'm interested in getting.

This is me watching the same website from the same computer.
screen.width says 1440px all the time, but as you see, I've decreased the width on the website with quite alot by holding ctrl + scrolling with mousewheel.

http://img524.imageshack.us/img524/6025/normalc.jpg
http://img59.imageshack.us/img59/8526/normal2n.jpg

Any ideas how to get that value? Because if they have 960px screen, and have zoomed out, I can still use 1200 wide website..
__________________
Tanax is offline  
Reply With Quote
Old 09-27-2009, 07:21 PM   #2 (permalink)
The Addict
 
Join Date: May 2009
Posts: 287
Thanks: 5
adamdecaf is on a distinguished road
Default

That is a browser specific setting, each browser has different amounts that it "zooms" and not all even "zoom" the same way. Some only increase text size while others bring your view closer.

You would have to check the browser specific API for that.
__________________
My Site
adamdecaf is offline  
Reply With Quote
The Following User Says Thank You to adamdecaf For This Useful Post:
Tanax (09-28-2009)
Old 09-27-2009, 09:41 PM   #3 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Where would I find that API?
__________________
Tanax is offline  
Reply With Quote
Old 09-27-2009, 09:49 PM   #4 (permalink)
The Addict
 
Join Date: May 2009
Posts: 287
Thanks: 5
adamdecaf is on a distinguished road
Default

On each browsers site. I doubt you will be able to actually do this, it will be very hard and require a lot of end-user work.
__________________
My Site
adamdecaf is offline  
Reply With Quote
Old 09-28-2009, 06:37 AM   #5 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

D'oh! Okay.. well then I guess I could have the option of setting their own width from a number of predefined options in their usercp with the starting value set to 960px

Thanks anyways!
__________________
Tanax is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing Lenght of a string in Javascript with jQuery EyeDentify Javascript, AJAX, E4X 4 09-23-2009 10:00 PM
Laptop with Matte Screen Wildhoney The Lounge 6 05-13-2009 10:21 AM
Showing background based on resolution 9three XHTML, HTML, CSS 8 05-04-2009 03:49 AM
ImageMagick and Print Screen Orc General 3 04-21-2008 11:42 PM
Is the double colon var resolution valid in an Argument? Orc Advanced PHP Programming 4 01-21-2008 12:19 PM


All times are GMT. The time now is 07:22 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design