View Single Post
Old 01-15-2007, 06:17 PM   #4 (permalink)
fjhdehoog
Junior Member
 
fjhdehoog's Avatar
 
Join Date: Jan 2007
Location: the netherlands
Posts: 3
Default Re: Plz help to solve my js problem

hi pal
i took another look at your specific question
athough im not entirely sure what u want
i think this is it
(someone reading this and want the script plz check previous post,this script is modified on request)

<html>
<!-- Created on: 4-9-2006 -->
<head>
<title></title>
<script type="text/javascript">
<!--//
//Created by: fjhdehoog -
/*Scriptname : Resolution Redirect -- Custom limited to 3 resolutions-- */
var Redirect1='index800x600.html';
var Redirect2='index1024x768.html';
var Redirect3='index1152x864.html';
var thiswidth=screen.width;
var thisheight=screen.height;
//the alert text if resolution is greater than 1280x1024 then redirect to Redirect3
var msg="Current resolution too high to view my page correctly.\nCurrent Resolution : "+ thiswidth +' x '+thisheight+"\nTip Lower your resolution.\nPage may not look pretty.";
/*NO NEED TO ALTER BELOW HERE */
if (thiswidth <= 800 && thisheight <= 600){location=(Redirect1);}
else if(thiswidth <= 1024 && thisheight <= 768){location=(Redirect2);}
else if(thiswidth <= 1152 && thisheight <= 864){location=(Redirect3);}
else if(thiswidth > 1152 && thisheight > 864){alert(msg);window.location=(Redirect3);}
//-->
</script>
</head>
<body>
</body>
</html>

mostlikely u already have figured it out
if not i hope this helps
peace

Last edited by fjhdehoog : 01-16-2007 at 02:46 PM.
fjhdehoog is offline   Reply With Quote
Sponsored Links