Send den besøkende videre til side med riktig oppløsning


Putt dette scriptet mellom HEAD-taggene på index-siden som skal sende den besøkende videre.
<script type="text/javascript">
<!-- Begin
/* Created by: fjhdehoog :: http://members.home.nl/fjhdehoog */

var thiswidth=screen.width;
var thisheight=screen.height;

// file to load if resolution is 640x480:
var if640x480 ="index640x480.html";

// file to load if resolution is 800x600:
var if800x600="index800x600.html";

// file to load if resolution is 1024x768:
var if1024x768="index1024x768.html";

// file to load if resolution is 1152x864:
var if1152x864="index1152x864.html";

// file to load if resolution is 1280x720:
var if1280x720="index1280x720.html";

// file to load if resolution is greater than 1280x720:
var Redirect ="http://www.google.com";

var msg="Sorry my page cannot be viewed with current resolution.\nCurrent Resolution : "+ thiswidth +' x '+thisheight+"\nTip
Set your resolution to 800 x 600.\nRedirecting to google.com"; location=(Redirect);

// Do not change anything below this line
// --------------------------------------
var width1 = 640; var height1 = 480;
var width2 = 800; var height2 = 600;
var width3 = 1024; var height3 = 768;
var width4 = 1152; var height4 = 864;
var width5 = 1280; var height5 = 720;

if (screen.width == width1 || screen.height == height1){
location=(if640x480);}
else if(screen.width == width2 || screen.height == height2){
location=(if800x600);}
else if(screen.width == width3 || screen.height == height3){
location=(if1024x768);}
else if(screen.width == width4 || screen.height == height4){
location=(if1152x864);}
else if(screen.width == width5 || screen.height == height5){
location=(if1280x720);}
else if(screen.width >= width5 || screen.height >= height5){
alert(msg);
}
//-->
</script>