Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/10/2005, 20:48
Monje
 
Fecha de Ingreso: enero-2002
Mensajes: 284
Antigüedad: 22 años, 4 meses
Puntos: 0
Resoluciones de pantalla

Hola, he usado el código de abajo que estaba en las Faqs pero da error en la línea <body onLoad="redireccionar()"> .
Alguien sabe porqué?

Saludos


<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.href= url640x480;
else if ((((nWdt == 800) && (nHgh == 600)) window.location.href= url800x600;
else if ((nWdt == 1024) && (nHgh == 768)) window.location.href= url1024x768;
else window.location.href= url640x480;
}
</script>
</head>
<body onLoad="redireccionar()">
</body>
</html>