Re: Help me!
| From: | Bobo Wieland | Date: | Mon, 01 Sep 2003 06:20:45 +0000 |
| Subject: | Re: Help me! | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-21293@lists.php.net to get a copy of this message | ||
I've used something like this for optimizing webpages for different
resolutions and have not had any problems...
<code>
<script language='JavaScript'>
<!-- Begin
function setWidth()
{
var W = screen.width;
location = "thepage.php?w=" + W;
}
// End -->
</script>
to get the value to php i then have this code:
if (isset($_GET["w"])) {
if ($_GET["w"] < 1024) { $scr_size = "s"; }
else if ($_GET["w"] >= 1024 && $_GET["w"] < 1152 ) { $scr_size =
"m"; }
else { $scr_size = "l"; }
}
----- Original Message -----
From: "Leskó József" <leskoj@axelero.hu>
To: <php-windows@lists.php.net>
Sent: Saturday, August 30, 2003 1:20 PM
Subject: [PHP-WIN] Help me!
Hello,
I am a 17 years old boy from Hungary, and I have problem with PHP. I hope
that you can help.
The problem: I ask the width and height of the screen with JavaScript, and
when the JavaScript give the values to the PHP they become string, so I
can't use the values as a number. I tried to change the type, but it's bad,
too.
I want that if the screen is bigger, the image is bigger.
I enclose a file, which show the problem.
I hope that you understand my problem, and sorry about the mistakes.
Leskó Dániel