Re: Re: Resalution Dection
| From: | Justin French | Date: | Tue, 29 Jan 2002 05:48:13 +0000 |
| Subject: | Re: Re: Resalution Dection | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82517@lists.php.net to get a copy of this message | ||
Be carefull which version of javascript is in use (or more to the point,
which version of javascript the browser supports), because these goodies
aren't available in earlier versions (even 1.1 from memory), and you may
want to do a lot of testing before being happy.
Justin French
Indent.com.au
Soundpimps.com
Christian Blichmann wrote:
>
> "Jeff Sheltren" <sheltren@home.com> wrote in message
> news:006901c1a552$ad42ebf0$0500a8c0@ellaptop...
> > Yes, you can use javascript to get the user's resolution:
> >
> > screen.width
> > screen.colorDepth
>
> You can also use
>
> window.innerWidth
> window.innerHeight
>
> (at least in Opera 4.x+ and NN4.x) or use
>
> document.body.clientWidth
> document.body.clientHeight
>
> (in IE) or through the DOM (Document Object Model,
> see http://www.w3c.org):
>
> document.body.offsetWidth
> document.body.offsetHeight
>
> This might be helpful for you as well...
>
> Christian Blichmann
>
> _____________________________________________
> don't hesitate - email me with your thoughts:
> e-mail: feedback.nospam@blichmann.de
> - please remove the ".nospam" from address.
> _____________________________________________
> do you want to know more?
> web: http://www.blichmann.de
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net