Re: Javascript / Php
| From: | Jason Garber | Date: | Wed, 28 Apr 2004 12:52:29 +0000 |
| Subject: | Re: Javascript / Php | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-9601@lists.php.net to get a copy of this message | ||
Hello,
This is the internal development mailing list. Please repost your question to the "General users list" at http://www.php.net/mailing-lists.php
FYI, PHP is a server side scripting language, and javascript is a client side scripting language. Javascript code will not be evaluated until long after PHP is finished.
~Jason
At 4/28/2004 02:37 PM +0200, Kyle Vorster wrote:
<?php function setscreen() { $height = "<script>document.write(screen.width);</script>"; $width = "<script>document.write(screen.height);</script>"; if (($height == "640") && ($width == "480")) {__________________________________________________________ Jason Garber President & Chief Technology Officer IonZoft, Inc. 814.742.8030 :: jason@ionzoft.com :: http://IonZoft.com __________________________________________________________echo "height == 640 & width = 480";} elseif (($height == "800") && ($width == "480")) {echo "2";} elseif (($height == "800") && ($width == "600")) {echo "3";} elseif (($height == "1024") && ($width == "576")) {echo "4";} elseif (($height == "1024") && ($width == "768")) {echo "Height = 1024 & width = 768";} echo "Height == $height & width == $width"; } ?> <?php setscreen(); ?> gives me this Height == 1024 & width == 768 but the html for that is Height == <script>document.write(screen.width);</script> & width == <script>document.write(screen.height);</script> and i wanne work with the 1024 in php and not with the html ,, what can i do to run the javascript at server side and not on the client side -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php