Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/03/2008, 16:41
undariarose
 
Fecha de Ingreso: febrero-2004
Ubicación: Asturias
Mensajes: 171
Antigüedad: 20 años, 3 meses
Puntos: 0
Image. funciona en ie6 pero no en ie7 y fire

Hola a todos. os cuento mi problema
tengo :

Código HTML:
<input type='file' id='photo' name='photo' onchange='cambiafoto1()' /><br/></label>
	<div id='datosf'></div>
	<div id='imgphoto1'></div> 

Código HTML:
	function cambiafoto1(){
		foto1= new Image();
		foto1.src=document.getElementById("photo").value;
		if (foto1.height>800) altofoto="<img src='http://www.asturnatura.com/Imagenes/visu/no.gif'> <span class='rojo'>alto= "+foto1.height+"px</span> ";
		else altofoto="<img src='http://www.asturnatura.com/Imagenes/visu/ok.gif'> altura= "+foto1.height+"px ";
		
		if (foto1.width>800) anchofoto="<img src='http://www.asturnatura.com/Imagenes/visu/no.gif'> <span class='rojo'>ancho= "+foto1.width+"px</span> ";
		else anchofoto="<img src='http://www.asturnatura.com/Imagenes/visu/ok.gif'> anchura= "+foto1.width+"px ";	
			
		if (foto1.height>1)	
		document.getElementById("imgphoto1").innerHTML= "&nbsp;&nbsp;&nbsp;<img src='"+document.getElementById("photo").value+"' width='120px'>";
		document.getElementById("datosf").innerHTML="&nbsp;&nbsp;&nbsp;"+altofoto+anchofoto;
	}
el caso es que sólo me funcion en ie6. podríais decirme qué es lo que está mal?
gracias