Ver Mensaje Individual
  #22 (permalink)  
Antiguo 01/12/2002, 21:46
Avatar de Kaopectate
Kaopectate
Colaborador
 
Fecha de Ingreso: diciembre-2001
Ubicación: Curaçao (Antillas Holandesas)
Mensajes: 3.179
Antigüedad: 22 años, 3 meses
Puntos: 38
22.- Resolución de pantalla

P: ¿Como puedo redireccionar mi página a otras dependiendo de la resolución del browser del cliente?

R:

Código PHP:
<html>
 <
head>
  <
script language="JavaScript">
   function 
redireccionar() {
    var 
url640x480 "http://www.tu-sitio.com/640x480";
    var 
url800x600 "http://www.tu-sitio.com/800x600";
    var 
url1024x768 "http://www.tu-sitio.com/1024x768";
    var 
nWdt screen.width;
    var 
nHgh screen.height;
    if ((
nWdt == 640) && (nHgh == 480)) window.location.hrefurl640x480;
    else if ((((
nWdt == 800) && (nHgh == 600)) window.location.hrefurl800x600;
    else if ((
nWdt == 1024) && (nHgh == 768)) window.location.hrefurl1024x768;
    else 
window.location.hrefurl640x480;
   }
  
</script>
 </head>
 <body onLoad="redireccionar()">
 </body>
</html>