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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php