-3
I’m doing a function with jQuery, but it doesn’t work, IE, it doesn’t reach my controller, someone could help me please follow the code:
var Aprovar = function () {
$.ajax({
url: 'GerenciaPassagem/AprovarPassagem',
type: 'POST',
contentType: "application/json; charset=utf-8",
dataType: "json",
data: JSON.stringify({ mes: $("#ListaPeriodo").val() }),
success: function (data) {
$("#tabFiltra").html(data);
drawTable();
},
beforeSend: function () {
$.blockUI({ message: '<img src="' + url + '/Content/ajax-loader.gif" alt="Aguardando..."/>' });
},
complete: function () {
$.unblockUI();
},
error: function (a, b, c) {
var x = a;
}
});
}
HTML
<input type="button" value="Aprovar" id="btAprovar" onclick="listaPassagens(); return false;" style="margin-left: 9px;" /> @*onclick="Aprovar(); return false;"*@
Your button does not call the function
Aprovar
, and yeslistaPassagens
.– bfavaretto
Read the bfavaretto? comment can reply and if necessary join function code
listaPassagens();
– Sergio
Add your Controller with this Actionresult
– Roger Barretto
Has this post already been fixed? @user7566 ???
– user6026