1
Problem in validating a form with ajax, follow the error..
$.ajax({
type: "POST",
url: "adicionaConcorrente",
cache: false,
data: $("#" + varForm).serialize(),
beforeSend: function() {
// Faz alguma coisa antes de enviar
},
success: function(result) {
$("#" + id).html("");
$("#" + id).html(result);
$('#idDoModal').modal('show');
},
complete: function() {
// Faz alguma coisa depois que terminar
}
});
You have to put the code you are using in order to help more. For example, what this added function looks like?
– Sergio
Will the url be okay? It’s just
adicionaconcorrente
?– Miguel
yes add Current?+ parameters
– Bruno
Do not miss the parameters? and will not be qql thing like
http://www.meusite.com/adicionaconcorrente.php?param1=123¶m2=123
?– Miguel
it would take the function, where: date: $("#" + varForm). serialize(),
– Bruno
Young man, the mistake could probably be on the line
data: $("#" + varForm).serialize()
, what the value of thisvarForm
? plays on the console the value and checks nomavente– user46708
correct, the error is in $("#" + varForm). serialize(): correction: ("#varForm"). serialize():
– Bruno