Just remember that not everyone surfs with their browser window
maximised.....

IIRC there's a window.innerheight and .innerwidth in NN's model, but not in
IE's <sigh>

Cheers
Jon


-----Original Message-----
From: Todd Kerpelman [mailto:[EMAIL PROTECTED]]
Sent: 26 February 2001 19:03
To: PHP
Subject: RE: [PHP] Screen Size?


> How do you determine a user's screen size (resolution)?  Isn't there a
> variable/function for this?

I doubt you could do this in PHP, since your browser doesn't normally
include screen size information in the headers it sends across to web
servers.

However, JavaScript can do this -- there's a screen object, with properties
called screen.width and screen.height that specify (surprisingly enough) the
width and height of the user's screen.

You could create a form with some hidden inputs, and have a JavaScript body
onLoad() event that would set the values of these hidden inputs to your
user's screen size. When PHP receives this form. it could process the
information from there.

Hope this helps...

--Todd


> -----Original Message-----
> From: Jason Bryner :: Focus Design Group, Inc.
> [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, February 25, 2001 10:52 PM
> To: PHP
> Subject: [PHP] Screen Size?
> 
> 
> How do you determine a user's screen size (resolution)?  Isn't there a
> variable/function for this?
> 
> 
> --
> Focus Design Group, Inc.
> http://www.focusdesigngroup.com
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 


**********************************************************************
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**********************************************************************

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to