Ver Mensaje Individual
  #3 (permalink)  
Antiguo 07/09/2010, 12:26
nx00
 
Fecha de Ingreso: agosto-2007
Mensajes: 345
Antigüedad: 17 años, 1 mes
Puntos: 21
Respuesta: examinar imagen y mostrarla antes de subirlar

Hola,

yo te recomiendo hacer lo que te dijo “carmagedon“.

De todas formas, existe una manera de hacer lo que quieres. Pero solo funcionaria al parecer con IE6 y con IE8 cambiando la configuración.

Por lo tanto mejor ni la tengas en cuenta. Si por curiosidad te gustaría saber como hacerlo lee el código.

Para cambiar la configuración de IE8 y que funcione este código debes realizar lo que aquí se indica:

http://www.forosdelweb.com/f18/hay-f...8/#post3548899

Código HTML:
<html>
<head>
<title>prueba</title>
<script>

function preview()
{
	var div;
	var pathImagen;
	
	pathImage = document.getElementById("image");
	pathImage = pathImage.value;
	
	
	div = document.getElementById("div-preview");
	div.innerHTML = '<img src="' + pathImage + '" alt="preview" />';
}

</script>
</head>
<body>
<form method="post" action="pagina.php" enctype="multipart form-data">
<input type="file" name="inputFile" id="image" onchange="preview()" />
</form>
<div id="div-preview"></div>
</body>
</html> 
__________________
----
http://www.mascodigo.com