Hi,
Can someone check this script? I can’t get a browser with resolution 480 x 480 and less (PDAs, Handhelds, etc…) to go to the url designated in var handheld.
// Grab the screen resolution
var width = screen.width;
var height = screen.height;
// Check the screen resolution
var handheld = width <= 480 && height <= 480 ? true : false;
// Change the following URLs to what you like
var handheldURL = "http://www.pdaurl.com";
var defaultURL = "http://www.screenurl.com";
// Check and redirect
var gotoURL = handheld ? handheldURL : defaultURL;
if(document.images)
{
window.location.replace(gotoURL);
}
else
{
window.location = gotoURL;
}