NameSilo

Resolution picker

Spaceship Spaceship
Watch
Impact
0
Hi...

Does anyone know how to program a javascript... or anykind of code that will detect what resolution someone is running, and then send them to the corresponding page?

thanks

WaveStorm :)
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
nevermind everyone... i found one... didnt work so i tried to make my own.. kinda worked :) thanks anyways.
 
0
•••
so do you want one that works if I can get hold of one for you?

PJ
 
0
•••
please pj
that would be great
 
0
•••
Here you go

HTML:
<script language="JavaScript1.2">
<!--

if (screen.width==800||screen.height==600) //if 800 by 600
window.location.replace("http://www.domain.com/800.php")

else if (screen.width==640||screen.height==480) //if 640 by 480
window.location.replace("http://www.domain.com/640.php")

else if (screen.width==1024||screen.height==768) //if 1024 by 768
window.location.replace("http://domain.com/1024.php")

else //if all else
window.location.replace("http://domain.com/dontknow.php") 

//-->
</script>

Please feel free to edit it, i.e add more resolutions, edit the urls etc etc etc.

Hope that helps you.

PJ
 
0
•••
thanks PJ. thats great +1 posttive feedback coming up :P

edit: works perfectly... yuoll be the first to see it in action
thanks again
 
Last edited:
0
•••
your welcome, a few searchs on google normally does the trick :)

PJ
 
0
•••
0
•••
No Probs dude, glad I could help :)

PJ
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back