[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    Re: [PHP-DEV] Javascript / Php
From:       George Schlossnagle <george () omniti ! com>
Date:       2004-04-28 12:54:21
Message-ID: 2AE2B660-9913-11D8-81F9-000393B2B3C0 () omniti ! com
[Download RAW message or body]

This is not the list you're looking for.  You want to ask this question 
on php-general@lists.php.net.


George

On Apr 28, 2004, at 8:37 AM, 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")) {
>       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
>
>
// George Schlossnagle
// Postal Engine -- http://www.postalengine.com/
// Ecelerity: fastest MTA on earth

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic