Hi,
I’m using the following script to redirect based on the browser and on the resolution of the screen:
<script type=”text/javascript”>
var w = screen.width;
var h = screen.height;
var browser = navigator.appName;
if((w == 800 && h == 600)&&(browser == “Netscape”)){
location = ‘page1’;
window.moveTo(0,0);
}else if((w == 800 && h == 600)&&(browser == “Microsoft Internet Explorer”)){
location = ‘page2’;
window.moveTo(0,0);
}else if((w == 1024 && h == 768)&&(browser == “Netscape”)){
location = ‘page3’;
window.moveTo(0,0);
window.resizeTo(w,h);
}else if((w == 1024 && h == 768)&&(browser == “Microsoft Internet Explorer”)){
location = ‘page4’;
window.moveTo(0,0);
window.resizeTo(w,h);
}
</script>
Now, I would like to double this code, taking in account the platform (mac or Windows) the client is running.
I’ve seen many coeds out there, but none that i seem to be able to implement with my code. (I’m a newbie).
Can you help ?
B