java equal or between 2 values...?

admin

Administrator
Staff member
Hi!

I am making a site with a detection so that I can direct anyone to the page with a specified screensize but I can't seem to get it to work any further.
I can only specify one value and no between values.
Here is a example of what I mean:

if (window.screen){
var w = screen.width;
tmt_url_800 = "detect800.htm";
tmt_url_1024 = "detect1024.htm";
tmt_url_1152 = "detect1152.htm";
tmt_url_na = "noscreen.htm";

if(w=600){
setTimeout("self.location=tmt_url_800",2000);
}
if(w=768){
setTimeout("self.location=tmt_url_1024",2000);
}
if(w>=864){
setTimeout("self.location=tmt_url_1152",2000);
}
if(w<=599){
setTimeout("self.location=tmt_url_na",2000);
}
if(w>=864){
setTimeout("self.location=tmt_url_na",2000);
}

I want it to add lines like IF W is between 0 and 599 goto href:.....html

Anyone who knows how?
I'm not such a expert in there things so...

Thanks! and Greetz from
Eelco.
 
Back
Top