Re: get a screen resolution

From: Date: Sun, 08 Jul 2001 16:36:19 +0000
Subject: Re: get a screen resolution
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56769@lists.php.net to get a copy of this message
Hi Marc, This is one for JavaScript, methinks. <html> <head> <title>Screen detection</title> <SCRIPT LANGUAGE="JavaScript"> <!-- function GetSW() { var sw = screen.width; return sw; } function GetSH() { var sh = screen.height; return sh; } //--> </SCRIPT> </head> <body> Your browser resolution is <SCRIPT LANGUAGE="JavaScript"> <!-- document.write(GetSW() + ' by ' + GetSH()); //--> </SCRIPT> pixels, so it's therefore recommended you view the site using this resolution (or whatever's closes to it). </body> </html> "Marc van Duivenvoorde" <yhcmarc@gmx.net> wrote in message news:5.1.0.14.0.20010706131638.0320ee28@ymondhc.intern.freehosting.nl... > I'm trying to make a small browser and screen resolution script for my > site, the browser part isn't a problem, but I can't find a function for > screen resolutions, does anyone know whether such a function exists. > > Thanks, > > Marc van Duivenvoorde >

« previous php.general (#56769) next »