And I'm having a hard time in Ajax.
I have the following:
beforeSend: function ()
{
$("#btnEvniar")
.prop('disabled', true)
.click(JaClicouProc(3,this));
},
success: function (resultado)
{
FechaDivAg();
swal({
title: "Sucesso!",
text: "Helpdesk enviado com Sucesso.",
showConfirmButton: false,
timer:3000,
html: true
});
$(".cam").each(function () {
$(this).val('');
});
}
The JaClicouProc()
function locks the screen so that the user is not sending multiple helpdesks ...
But it does not enter into the success section of Ajax. this function FehcaDivAg()
unlocks the screen.
In the Ajax target file which is a .php file I am giving echo "true";
Does anyone know why you are not getting into success ?
Follow function code as requested!
function JaClicouProc(qualmsg, wcam, msgopc)
{
if (typeof(msgopc) != "undefined")
ShowAguarde(qualmsg, msgopc);
else
ShowAguarde(qualmsg);
// ShowAguarde(qualmsg); :MostraAguarde
document.getElementById(wcam.id).blur();
// gab 2016-07-26. Usa a função para não processar duas vezes (a mesma do botão salvar)
return true;
}