Posted by Erwin Moller on 04/04/06 13:56
webramz@gmail.com wrote:
> You can do this by JavaScript not PHP (or both of them together for
> some reason):
>
> <script language="JavaScript>
A little addition:
<script type="text/javascript">
is better than
<script language="Javascript">
The ancient language-tag is depricated for some time and could be dropped by
browsers anytime. (better safe than sorry. :-)
> var w = screen.width;
> var h = screen.height;
In case you care about colordepth, screen also holds a colorDepth.
var colorDepth = screen.colorDepth;
8 means 256 colors.
So it contains the base-2 logarithm.
Regards,
Erwin Moller
>
> alert('You are using ' + w + 'x' + h + ' resolution...!');
>
> </script>
>
> Behzad Nategh
[Back to original message]
|