Here is a snippet of code from my jsp page:
<form name="programarRutasForm" method="post" action="/SGT_Galp_web/programarRutas.do">
<table>
<tr>
<td>
<input type="button" name="insereVuelta" value="Insere Vuelta" onclick="insereVuelta()" id="insereVuelta">
</td>
<td>
<input type="submit" name="criaRuta" value="Cria Ruta" id="criaRuta">
</td>
</tr>
</table>
...
After clicking the button insereVuelta
, an exception appears with the message:
Uncaught TypeError: object is not a function
However, when I move the button outside the form, everything works fine. Why is this happening? I really need to keep the button next to the submit button inside the form.