Re: Help me about detect client screen resolution!!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/2/07, Stut <stuttle@xxxxxxxxx> wrote:

Le Phuoc Canh wrote:
> Can we use php to detect client screen resolution? Please help me ?
>

No "we" can't. "You" need Javascript or another "client"-side technology
for that.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


<script type="text/javascript">

var thisSize;
function showStats() { thisSize = 'Screen resolution is ' + screen.width + '
x ' + screen.height;
    if (thisSize) {
         document.getElementById("output").innerHTML = thisSize;
    }
}

</script>

<html>

<a href="javascript:showStats();">Screen Resolution</a>

<p id="output"></p>

</html>



I think this should work.



David

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux