snippet library logo
Amazon.com
in category
Javascript / Browser / Redirect by Resolution
Snippet details
ID: 24
Viewed: 1277
Added: 2001-11-23
Version:
View Demo

User Rated at:
Rate This:
Snippets in this catagory         
Show Printable Version
detects the screen resolution of the user and redirects them to a specific page.

General Details
Snippet uploaded by: snippet
Email : webmaster@snippetlibrary.com
Snippet By: Unknown

<!---Head--->
<SCRIPT LANGUAGE="JavaScript"> 

<!-- Begin 
function redirectPage() { 
var url640x480 = "indexlinks640.htm"; 
var url800x600 = "indexlinks800.htm"; 
var url1024x768 = "indexlinks1024.htm"; 
if ((screen.Width == 640) && (screen.height == 480)) 
window.location.href= url640x480; 
else if ((screen.Width == 800) && (screen.height == 600)) 
window.location.href= url800x600; 
else if ((screen.Width == 1024) && (screen.height == 768)) 
window.location.href= url1024x768; 
else window.location.href= url640x480; 

// end --> 
</script> 

<!---Body--->


//And Put this bit In the button (If you are using a button) 

onClick="redirectPage()" 




No Reviews to show


Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Subject:

Reviewed By:

Write a review:





Terms of Conditions
Powered By
Avian Hosting
© 2005 snippetlibrary.com All Rights Reserved.