Ver Mensaje Individual
  #7 (permalink)  
Antiguo 21/05/2011, 10:21
Avatar de Etherman
Etherman
 
Fecha de Ingreso: abril-2011
Mensajes: 93
Antigüedad: 13 años
Puntos: 2
Respuesta: ¿Cómo mostrar automáticamente los input type según selecciono el archivo?

Gracias caricatos, por cierto, fabulosa página.
Aunque funcionaba bien, no supe sacar nada en claro de cómo funcionaba aquel código..
Bueno, como no me sirve la maña uso la fuerza, he usado un código para ocultar campos, y el código me queda así:

Código HTML:
Ver original
  1. <div class="pre-spoiler">
  2. 01 <input type="file"name="imgfile1"><span style="float: left; padding-top: 2px;"></span><input id="xs" value="Poner otra" style="margin-left: 50px; padding: 0px; width: 80px; font-size: 14px; font-family: trebuchet ms;" onclick="if(this.parentNode.getElementsByTagName('div')[0].style.display != ''){this.parentNode.getElementsByTagName('div')[0].style.display = '';this.value = 'Ocultar';}else{this.parentNode.getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Poner otra';}" type="button" /><div class="spoiler" style="display: none;">
  3. <div class="pre-spoiler">
  4. 02 <input type="file"name="imgfile2"><span style="float: left; padding-top: 2px;"></span><input id="xs" value="Poner otra" style="margin-left: 50px; padding: 0px; width: 80px; font-size: 14px; font-family: trebuchet ms;" onclick="if(this.parentNode.getElementsByTagName('div')[0].style.display != ''){this.parentNode.getElementsByTagName('div')[0].style.display = '';this.value = 'Ocultar';}else{this.parentNode.getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Poner otra';}" type="button" /><div class="spoiler" style="display: none;">
  5. <div class="pre-spoiler">
  6. 03 <input type="file"name="imgfile3"><span style="float: left; padding-top: 2px;"></span><input id="xs" value="Poner otra" style="margin-left: 50px; padding: 0px; width: 80px; font-size: 14px; font-family: trebuchet ms;" onclick="if(this.parentNode.getElementsByTagName('div')[0].style.display != ''){this.parentNode.getElementsByTagName('div')[0].style.display = '';this.value = 'Ocultar';}else{this.parentNode.getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Poner otra';}" type="button" /><div class="spoiler" style="display: none;">
  7. <div class="pre-spoiler">
  8.  04 <input type="file"name="imgfile4"><span style="float: left; padding-top: 2px;"></span><input id="xs" value="Poner otra" style="margin-left: 50px; padding: 0px; width: 80px; font-size: 14px; font-family: trebuchet ms;" onclick="if(this.parentNode.getElementsByTagName('div')[0].style.display != ''){this.parentNode.getElementsByTagName('div')[0].style.display = '';this.value = 'Ocultar';}else{this.parentNode.getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Poner otra';}" type="button" /><div class="spoiler" style="display: none;">
  9. <div class="pre-spoiler">
  10. 05 <input type="file"name="imgfile5"></div>
  11. </div> </div>
  12. </div> </div>
  13. </div> </div>
  14. </div> </div>
  15. </div></div>