Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/07/2009, 08:51
Avatar de mdk
mdk
 
Fecha de Ingreso: noviembre-2002
Mensajes: 531
Antigüedad: 21 años, 6 meses
Puntos: 11
Respuesta: Problema detectando el alto

Vale, muchisimas gracias, ahora hace exactamente lo que deberia de hacer, pero ahora en internet explorer me da el siguiente error en la linea 14:

No Implementado.

Y luego en firefox tambien me da 2 errores, y no me pinta el fondo de la capa de color rojo como en internet explorer. Y los dos errores son los siguientes:


Error al leer el valor para la propiedad 'width'. Declaración rechazada.
(Aqui la direccion del archivo)
Error al leer el valor para la propiedad 'height'. Declaración rechazada.
(Aqui la direccion del archivo)


Asi, tal cual me lo pone la consola de errores del firefox.

El archivo script.js lo deje asi al final:

Código:
function LoadIni() {
	LanzVars();
	MountLayer(0, 0, DocWidth, DocHeight, 'BackGround');
}
function LanzVars() {
	DocHeight = 0; DocWidth = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//No-IE
		DocWidth = window.innerWidth;
		DocHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ en modos standar
		DocWidth = document.documentElement.clientWidth;
		DocHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		DocWidth = document.body.clientWidth;
		DocHeight = document.body.clientHeight;
	}
} 
function MountLayer(PosLeft, PosTop, TWidth, THeight, Layer) {
	ObjDiv = document.getElementById(Layer);
	ObjDiv.style.visibility = "visible";	
	ObjDiv.style.position	= "absolute";
	ObjDiv.style.left 		= PosLeft;
	ObjDiv.style.top 		= PosTop;
	ObjDiv.style.width		= TWidth;
	ObjDiv.style.height		= THeight;
	ObjDiv.style.backgroundColor = "red";
}
Así que que deberia de hacer para que no me salieran errores y en firefox me pinte el fondo de la capa de rojo como he puesto?
__________________
SoY Lo Ke VeS iNKLuSo KuAnDo No Me VeS ;)