Resolution Sniffer with redirect capability (Java Script)

by Simon Rolfe <ideas(at)creativegenius.ca>

 Date:  Tue, 09 Jan 2001 10:40:32 -0800
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original
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