TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Javascript, AJAX, E4X (http://www.talkphp.com/javascript-ajax-e4x/)
-   -   Accessing screen-resolution? (http://www.talkphp.com/javascript-ajax-e4x/4978-accessing-screen-resolution.html)

Tanax 09-27-2009 05:37 PM

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..

adamdecaf 09-27-2009 07:21 PM

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.

Tanax 09-27-2009 09:41 PM

Where would I find that API?

adamdecaf 09-27-2009 09:49 PM

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.

Tanax 09-28-2009 06:37 AM

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!


All times are GMT. The time now is 08:00 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0