Ver Mensaje Individual
  #5 (permalink)  
Antiguo 22/08/2006, 01:58
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 1 mes
Puntos: 61
En firefox sería algo así:

Código:
<html>
<head>
<script>

function cambio(){
x=window.outerWidth;
y=window.outerHeight;
x=(x<800)?800:x;
y=(y<500)?500:y;
document.getElementById("pepe").innerHTML="<strong>X:</strong> "+x+"<br><strong>Y:</strong> "+y
window.resizeTo(x,y);
}
</script>
	<title>Untitled</title>
</head>

<body onresize="cambio()" onload="cambio()">
<div id="pepe"></div>

</body>
</html>
Y en IE... me estoy volviendo loco!

A ver qué tal esto. Está mal, luego sigo:

Código:
<html>
<head>
<script>
ie=navigator.appVersion.indexOf('MSIE')!=-1;
maxX=800;
maxY=500;


maximoX=(ie)?maxX:maxX;
maximoY=(ie)?maxY:maxY;

function cambio(){
x=(ie)?document.body.clientWidth:window.outerWidth;
y=(ie)?document.body.clientHeight:window.outerHeight;
document.getElementById("pepe").innerHTML="<strong>X:</strong> "+x+"<br><strong>Y:</strong> "+y;
x=(x<maximoX)?maxX:x;
y=(y<maximoY)?maxY:y;


window.resizeTo(x,y);
}
</script>
	<title>Untitled</title>
</head>

<body onresize="cambio()" onload="cambio()">
<div id="pepe"></div>

</body>
</html>
Un saludo!
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.