07-13-2002, 04:18 AM
I currently program my entire web site in PHP. However, recenty I needed to detect the screen size and subtract a certain amount from it, then create a table that wide. BUT, unfortunately it doesn't work.
Can someone please help me on how to detect a user's screen size with PHP?
07-13-2002, 09:55 AM
PHP is executed on the server before any information of the user (like screen size) is sent to PHP.
07-13-2002, 11:09 AM
You should use relative (%) values rather than absolute :
For example : if you want the table to be half the size of the screen do :
07-14-2002, 04:53 AM
echo "$_GET[height] :: $_GET[width]";
so that reloads the page with the $_GET[width] && $_GET[height] variables available to PHP, non-js browsers will just ignore it so you can not depend on the values being available.
window.document.labeltitlefaq.innerText='<?php echo($arrayFAQtitle[faqid])?>' ;
Thanks for your support
Forget to say that the previous code does not work.
08-28-2006, 04:07 AM
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.