1
I have a registration page and I wanted it to be sent my form the page did not update and open a div
occult.
With the script below does not let my page refresh, but also does not send my form to the database:
<script>
jQuery(document).ready(function(){
jQuery('#meufrm').submit(function(){
var dados = jQuery(this).serialize();
jQuery.ajax({
type: "POST",
url: "vendas.php",
data: dados,
success: function( data )
{
if (data == "")
}
});
return false;
});
});
That other script hidden my div
that works just right:
<script type="text/javascript">
function mostra() {
if (document.getElementById('teste').style.display == 'block'){
document.getElementById('teste').style.display = 'none';
}else {document.getElementById('teste').style.display = 'block'}
}
</script>
"but also does not send my form to the bank " - how so? can explain what fails?
– Sergio
type when I press the Ubmit button the page does not update and open the hidden div , more the form data is not sent to the database understands ?
– Matheus Goes
@Matheusgoes and what does the console? bugs? on the network part shows the ajax request exiting? what arrives on the server? "sales.php" is the right file? what is the source of that file?
– Sergio