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= " <img src='"+document.getElementById("photo").value+"' width='120px'>";
document.getElementById("datosf").innerHTML=" "+altofoto+anchofoto;
}
el caso es que sólo me funcion en ie6. podríais decirme qué es lo que está mal?
gracias