Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/04/2012, 15:59
merchell
 
Fecha de Ingreso: marzo-2012
Mensajes: 28
Antigüedad: 12 años, 1 mes
Puntos: 1
Respuesta: Apoyo Adjuntar imagen a un input desde javascript

Por si no me explique
miren seria estoo lo que quiero hacer

Código HTML:
Ver original
  1. <!-- Copiar dentro del tag HEAD -->
  2. <script LANGUAGE="JavaScript">
  3.     function oculta()
  4.     {
  5.         document.getElementById("upform").style.visibility="hidden"
  6.     }
  7.     function manda()
  8.     {
  9.         document.getElementById("archivo").value="images/sinfoto.gif";
  10.         document.getElementById("id").value=123456;
  11.         document.getElementById("upform").submit();
  12.     }
  13. </head>
  14. <body onload="oculta()">
  15. <!-- Copiar dentro del tag BODY -->
  16. <form action="http://www.trueware.mx/eduardo/mybiometrics_online/subir.php" method="post" enctype="multipart/form-data" name="form" id="upform">
  17.     <label for="archivo">Archivo</label>
  18.     <input name="archivo" type="file" id="archivo" />
  19.     <input type="text" name="id" id="id" size="2">
  20.     <input name="boton" type="submit" id="boton" value="Enviar" />
  21. </form>
  22. <a href="#" onclick="manda()">Manda el inche formulario</a>
  23.  
  24. </body>
  25. </html>