RE: [PHP-DB] determine screen resolution in PHP?

From: Date: Tue, 10 Oct 2000 17:52:38 +0000
Subject: RE: [PHP-DB] determine screen resolution in PHP?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-3488@lists.php.net to get a copy of this message
I don't remember right off the top of my head how to get the window size, but you should be able to work up a script easily enough. To accomplish this, I'd do something like: (I'm not a javascript expert... the syntax may be incorrect here) <head> <script language="javascript"> <!-- function init() { theform.width = screenWidth; theform.height = screenHeight; theform.submit(); } // --> </script> <head> <body onLoad="javascript:init()"> <form name="theform" method="post" action="myscript.php"> <input type="hidden" name="width"> <input type="hidden" name="height"> </form> </body> As soon as this is done loading (very quickly), it should auto-submit to your script. From there, you can set a session cookie with the desired values (so you can track the width through multiple scripts 'n stuff). Hope this helps, -- Troy Settle Pulaski Networks 540.994.4254 It's always a long day, 86400 doesn't fit into a short > -----Original Message----- > From: huangb@rdms.pyr.ec.gc.ca [mailto:huangb@rdms.pyr.ec.gc.ca]On > Behalf Of Bernie Huang > Sent: Tuesday, October 10, 2000 1:44 PM > To: Troy Settle > Cc: The Shadow; php-db@lists.php.net > Subject: Re: [PHP-DB] determine screen resolution in PHP? > > > Troy Settle wrote: > > > No. PHP is server side. The server knows next to nothing about the > > client (version and OS if you're lucky). You would need to write > > something in javascript, then post the numbers back to PHP. > > > > G'luck, > > > > -- > > Troy Settle > > Pulaski Networks > > 540.994.4254 > > > > ** -----Original Message----- > > ** From: The Shadow [mailto:dibya@radioclick.com] > > ** Sent: Saturday, October 07, 2000 6:15 AM > > ** To: php-db@lists.php.net > > ** Subject: [PHP-DB] determine screen resolution in PHP? > > ** > > ** > > ** is there PHP function that able to determine the screen resolution? > > ** thanx > > ** > > ** > > ** > > ** -- > > ** PHP Database Mailing List (http://www.php.net/) > > ** To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > > ** For additional commands, e-mail: php-db-help@lists.php.net > > ** To contact the list administrators, e-mail: > > ** php-list-admin@lists.php.net > > ** > > ** > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > > For additional commands, e-mail: php-db-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > Hi, > > It's easy to pass php values to js, but how do I pass js values to php? > Thanks for your help! > > > - Bernie >

« previous php.db (#3488) next »