2
I’m having a problem sending a jQuery form, Submit was only to be done by one button but I have two in the form, and Submit is done by both. how to solve this problem??
<script type="text/javascript">
$(document).ready(function() {
$('#resultados').hide();
$("#formulario").submit(function() {
$('#resultados').show();
$('#resultados').html("resultados");
return false;
});
});
</script>
<div id="resultados"></div>
<form method="POST" id="formulario" action="">
<input type="submit" value="enviar" id="botao_enviar" name="enviar">
<button>outro botão</button>
</form>
First put all the
js
before the closure ofbody
– Rafael Augusto
Put the other button this way
<button type="button">outro botão</button>
, see if it works.– Leandro Simões
then just define the
button
thus<button type="button">Outro botão</button>
– Rafael Augusto
Thanks guys, it worked here.
– Xiro Nakamura