Hi,
I need to redirect visitors depending initially on their browser, but more importantly on their screen resolution.
I am using this:
Could you check that it works for me, because I only have IE5 and NS6.PHP Code:
<SCRIPT LANGUAGE="JavaScript">
function redirectPage() {
var page640x480 = "http://www.weirdbeard.f2s.com/test/640.html";
var page800x600 = "http://www.weirdbeard.f2s.com/test/800.html";
var page1024x768 = "http://www.weirdbeard.f2s.com/test/1024.html";
var page1640x768 = "http://www.weirdbeard.f2s.com/test/1640.html";
var pagenetscape = "http://www.weirdbeard.f2s.com/test/netscape.html";
var pageopera = "http://www.weirdbeard.f2s.com/test/opera.html";
if (navigator.appName == 'Netscape')
window.location.href= pagenetscape;
else if (navigator.appName == 'Opera')
window.location.href= pageopera;
else if ((screen.width == 640) && (screen.height == 480))
window.location.href= page640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= page800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= page1024x768;
else window.location.href= page1640x480;
}
</script>
Specifically I'd like Opera users/ older NS browsers and people at different resolutions -- can you post your specs after testing?
*edited out address - it works fine*
Thanks a lot![]()




Bookmarks