Hechadme una mano con esto. document.forms[0].submit no funciona

(1/1)

70N1:
Hola.
Intento crear una tabla dentro de un form al que le pongo el id desde una variable.
y le doy el action y el submit desde un onclick.
Este es el codigo.


Código:

echo '<form id="'.$NOMBRE.'" name="'.$NOMBRE.'" method="post" action="">
  <table width="100%" border="1">
    <tr>
      <td width="26%" height="20"><a href="#" onClick="document.    form1.action[/b]=cargarContenidos(\'cambiarfichaadulto.php\');document. form1.submit();" title="Crear ficha">'.$NOMBRE.'</a></td>
        <td width="37%">'.$APELLIDOS.'</td>
        <td width="18%">'.$DNI.'</td>
         <td width="19%">'.$identificador.'</td>
      </tr>
    </table> <input type="hidden" name="MM_insert" value="renovar" />
                   </form>';

No me funciona de ninguna manera, ni poniendo forms[0], forms['antonio'].
Me podeis ayudar?


document.form1.action asi si funciona, pero quiero manejar los demas forms



Shell Root:
:http://www.javascript-coder.com/javascript-form/javascript-form-submit.phtml

Código
document.forms["myform"].submit();

Navegación

[0] Índice de Mensajes