Funziona provato su Firefox.
Al solito Internet Explorer fa le cose a modo suo ...
Poi c'era una logica sbagliata ed io stavo 'dormendo!'
Testato e funzionante (poi togli tu gli alert!)
HTHcodice:<html> <head> <script type="text/javascript"> var w = screen.width; var h = screen.height; alert("width:"+w.toString()+" height:"+h.toString()); if (w>=1680) { alert("Maggiore o uguale a 1680: w=" + w.toString()); document.location.href="for1280.html"; } else if (w>=1280) { alert("Maggiore o uguale a 1280: w=" + w.toString()); document.location.href="for1280.html"; } else if (w>=1024) { alert("Maggiore o uguale a 1024: w=" + w.toString()); document.location.href="for1024.html"; } else if (w>=800) { alert("Maggiore o uguale a 800: w=" + w.toString()); document.location.href="for800.html"; } else { alert("Meno di 800!!: w=" + w.toString()); document.location.href="forunknown.html"; } </script> </head> <body> </body> </html>
Zappa