Sep 18, 2001 #1 korndogg Programmer Jun 26, 2000 22 BA I need a script to detect a screen resolution(800 x 600 or 1024 x 768) and to redirect to 800_600.html or 1024_768.html thnx
I need a script to detect a screen resolution(800 x 600 or 1024 x 768) and to redirect to 800_600.html or 1024_768.html thnx
Sep 18, 2001 #2 GIGN Programmer Oct 6, 2000 1,082 NZ the screen object holds this info - why do you wan to have different pages - won't this become a pain after a while? if(screen.width == 1024)document.location.href = "1024_768.html " Bj Upvote 0 Downvote
the screen object holds this info - why do you wan to have different pages - won't this become a pain after a while? if(screen.width == 1024)document.location.href = "1024_768.html " Bj
Sep 19, 2001 Thread starter #3 korndogg Programmer Jun 26, 2000 22 BA just intro stuff main page will be tha same Upvote 0 Downvote
Sep 20, 2001 #4 Zot Technical User Mar 26, 2001 11 GB Try this ... it worked a treat for me ! <html> <head> <title>Untitled Document</title> </head> <body bgcolor="#FFFFFF"> <SCRIPT language="JavaScript"> <!-- if ((screen.width ==544) && (screen.height == 376)) { window.location="R1.HTM" } if ((screen.width ==640) && (screen.height == 480)) { window.location="R2.HTM" } if ((screen.width ==720) && (screen.height == 512)) { window.location="R3.HTM" } if ((screen.width ==800) && (screen.height == 600)) { window.location="R4.HTM" } if ((screen.width ==1024) && (screen.height == 768)) { window.location="R5.HTM" } if ((screen.width ==1152) && (screen.height == 864)) { window.location="R6.HTM" } if ((screen.width ==1280) && (screen.height == 1024)) { window.location="R7.HTM" } if ((screen.width ==1600) && (screen.height == 1200)) { window.location="R8.HTM" } if ((screen.width ==1920) && (screen.height == 1200)) { window.location="R9.HTM" } //--> </SCRIPT> </BODY> Upvote 0 Downvote
Try this ... it worked a treat for me ! <html> <head> <title>Untitled Document</title> </head> <body bgcolor="#FFFFFF"> <SCRIPT language="JavaScript"> <!-- if ((screen.width ==544) && (screen.height == 376)) { window.location="R1.HTM" } if ((screen.width ==640) && (screen.height == 480)) { window.location="R2.HTM" } if ((screen.width ==720) && (screen.height == 512)) { window.location="R3.HTM" } if ((screen.width ==800) && (screen.height == 600)) { window.location="R4.HTM" } if ((screen.width ==1024) && (screen.height == 768)) { window.location="R5.HTM" } if ((screen.width ==1152) && (screen.height == 864)) { window.location="R6.HTM" } if ((screen.width ==1280) && (screen.height == 1024)) { window.location="R7.HTM" } if ((screen.width ==1600) && (screen.height == 1200)) { window.location="R8.HTM" } if ((screen.width ==1920) && (screen.height == 1200)) { window.location="R9.HTM" } //--> </SCRIPT> </BODY>