Ver Mensaje Individual
  #4 (permalink)  
Antiguo 14/09/2008, 22:47
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 9 meses
Puntos: 416
Respuesta: Saber la ruta del archivo

No creo que sea posible.

Porque al tratar de conseguir el "value" de el campo de archivo solo muestra el nombre de el archivo. No la ruta.

Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<script language="javascript">

	function campoFile() {
		document.getElementById('value').innerHTML = document.formulario.file.value;
	}

</script>
</head>

<body>
<form action="" method="post" enctype="multipart/form-data" name="formulario" id="form1">
  <input type="file" onchange="campoFile();" name="file" />
</form>
<div id="value"></div>
</body>
</html>