hwg-techniques archives | Jan 2001 | new search | results | previous | next |
Resolution Sniffer with redirect capability (Java Script)by Simon Rolfe <ideas(at)creativegenius.ca> |
|
The other day someone was asking about a resolution sniffer that had the capability to redirect as well. Here it is:) <HTML> <HEAD> <SCRIPT language="JavaScript1.2"> <!-- if (screen.width==800||screen.height==600) //if 800x600 window.location.replace("http://www.your800x600page.com") else if (screen.width==640||screen.height==480) //if 640x480 window.location.replace("http://www.your640x480page.com") else if (screen.width==1024||screen.height==768) //if 1024x768 window.location.replace("http://www.your1024x768page.com") else //if all else window.location.replace("http://www.imsure you get theidea.com") //--> </script> <TITLE></TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> </BODY> </HTML> Regards, Simon Rolfe, Senior Partner Creative Genius Communications ideas(at)creativegenius.ca
HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA