Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/02/2013, 10:29
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Gestionar etiqueta <embed> con JS. <embed> genera campo de formulario no d

Si, bastante curioso eso del embed, no lo entendía hasta que probé esto
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>titulo</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. </head>
  7. <form action="#">
  8. <table border="1">
  9. <tr>
  10. <td>
  11. <input name="boton1" type="button" value="x1"/>
  12. <input name="boton2" type="button" value="x2"/>
  13. </td>
  14. </tr>
  15. <tr>  
  16. <td>
  17. <embed src="avcamelias.mp3" autostart="true" loop="true" width="280" height="42" />
  18. </td>
  19. </tr>
  20. <tr>
  21. <td>
  22. <input type="text" size="2" id="anioselec" name="audioselect" value="x3" />
  23. <input name="boton3" type="button" value="x4" onclick="calculo();" />
  24. </td>
  25. </tr>
  26. <tr>
  27. <td> ttttt </td>
  28. <td> jjjj </td>
  29. </tr>
  30. <input type="hidden" name="m" value="x5" />
  31. <input type="hidden" name="n" value="x6" />
  32. <input type="hidden" name="p" value="x7" />
  33. <input type="hidden" name="senial" value="x8" />
  34. </form>
  35.  
  36.  
  37. <script type="text/javascript">
  38. //<![CDATA[
  39. window.onload = function(){
  40. var a= document.forms[0];
  41. for (var i=0;i<a.length;i++)
  42. {
  43.     if(a[i].tagName == 'INPUT'){
  44. alert(a[i].tagName + "-" + a[i].value +  "\n");
  45. }
  46. }
  47. }
  48. //]]>
  49.  
  50. </body>
  51. </html>

Es decir tuve que corregirlo verificando el tagName. Hecho de esa manera en todos los browsers da 8.
Por lo de la conversión, con esta herramienta desde la linea de comandos es sencillo
http://v2v.cc/~j/ffmpeg2theora/

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.