I'd like to return true from a function in a function. Here is the code for better understanding:
function abc() {
form = $('form');
formData = form.serialize();
$.post('../control/request.php', formData, function(result) {
return true;
});
}
if (abc()) {
// true
} else {
// false
}
Aucun commentaire:
Enregistrer un commentaire