I was wondering if anyone knew of a way to check the screen resoultion on the client side. I'm guessing you can't do this with php (ya know the whole server side limitation thing), i was wondering if you could with js?!?!?!?!
wanted to have several different pages, and load a different one depending on the clients resoultion...
THANKS IN ADVANCE
getting client's screen resoultion.....
Moderator: General Moderators
Client-side.
On your index page use JavaScript to grab the screen resolution and then auto-redirect the browser to another page.
On your index page use JavaScript to grab the screen resolution and then auto-redirect the browser to another page.
Code: Select all
<head>
<script type="text/javascript">
var w = screen.availWidth;
var h = screen.availHeight;
var goto = "anotherPage.php?width="+w+"&height="+h;
if(document.images)
{
window.location.replace(goto);
}
else
{
window.location = goto;
}
</script>
</head>