Simple question
| From: | William Stokes | Date: | Tue, 27 Apr 2004 07:35:20 +0000 |
| Subject: | Simple question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-184740@lists.php.net to get a copy of this message | ||
probably? ;-)
I need to determine users resolution and place objects on the page according
to that information. I'm trying to get this work but it doesn't. It always
ends up with echoing "large". I really don't know why. Can anyone help me?
Here's the script:
<?php
DEFINE('RESOLUTION','<script
language="javascript">document.write(screen.width+" x
"+screen.height);</script>');
$res = RESOLUTION;
echo "$res";
echo "<br>";
echo (gettype($res));
echo "<br>";
if ($res == '800 x 600'){
echo "small";
}
else if ($res == '1024 x 768'){
echo "medium";
}
else {
echo "large";
}
?>