The "success" of the AJAX submission function works, but the "url" does not do its function of executing the code. Just check if the directory exists and then go to "success"; If in the "url" I put a false directory it does not go to "success".
For the FORM I have
<form method="POST" id="botones_estado" name="botones_estado" action="estados/quebueno.php">
<div class="btn-group btn-group-justified">
<div class="btn-group">
<button type="submit" onclick="quebueno();" name="btn_quebueno_estado" class="btn btn-default" value="<?php echo $usuario_posteando['id_posteando']; ?>">Qué bueno</button>
</div>
</div>
</form>
For functions I have
function quebueno(){
$('#botones_estado').submit(function() {
$.ajax({
type: 'POST',
url: 'quebueno.php',
data: $(this).serialize(),
success: function(data) {
location.reload(true);
}
});
return false;
});
}
The PHP code found in "quebueno.php" I already tried it with the ACTION of the FORM and it works perfectly. But I want my page to AVOID the update when sending the form. Someone that please correct me.