javascript - ajaxStart does not work on Ajax Post -
i have ajaxstart event working fine ajax loads. when post not working @ all.
here code render per pages.
$(document).ajaxcomplete(function () { hideicon(); if (stepstate !== '' && stepstate !== constants.disabled_form) { enableelement(); } }); $(document).ajaxstart(function () { showicon(); disableelement(); });
and here post.
var sendrequest = function (url, data) { $.ajaxprefilter(function( options ) { options.global = true; }); $.ajax({ datatype: "json", method: "post", url: url, data: data, success: function (data) { applicationalerts.showstatus(data); loaddocumentgroup(); } }); };
i follow tickets here https://forum.jquery.com/topic/ajaxstart-is-not-working, in case not work.
i´m using jquery 1.11
any suggestion?. thanks!
i think made mistake in ajax
function.try change
$.ajax({ datatype: "json", type: "post", ..... });
there no parameter method
in ajax
request.you need use type
parameter specify type of request.(get or post)
hope works!. thanks
Comments
Post a Comment