showing results for - "how to show a success message when ajax called successfully"
Lorenzo
01 Mar 2016
1 BY LOVE,
2 1- "beforeSend" event used to execute something before ajax call
3 2- "complete"   event used to execute something after the ajax called successfull.
4 
5$.ajax({
6                url: ' @Url.Action("AttendanceUpdateLate", "Attendance")',
7                data: { Emp: $("#txtEmpid").val(), Status: $("#ddlAttendance").val(), day: $("#ddlday").val(), Month: $("#Month").val() },
8                datatype: "json",
9                type: "POST",
10                contenttype: 'application/json; charset=utf-8',
11                async: true,
12                success: function (data) {
13                    alert(data);
14                },
15                beforeSend: function () {
16                    alert("Alert showing before AJAX call");
17
18                },
19                complete: function () {
20                  alert("Alert showing after AJAX call successfully");
21                    $("#txtEmpid").val('');
22                    $("#ddlday").val('');
23                    $("#ddlAttendance").val('');
24                },
25                error: function (xhr) {
26                    alert('error occured');
27                }
28            });
queries leading to this page
show success ajax response in alertshow error message in ajaxon ajax response show success messageshow success message after ajaxhow to show success message in ajaxajax success and not successjquery on ajax successjquery ajax success and failure exampleshow ajax error messageshow success message on the browser in ajax successalert are you sure before ajax jshow to print success message in ajaxjquery ajax success and completehow to return ajax success data in jqueryshow message in ajax callhtml response on ajax success messagehow to get success message from ajax calljquary success message displayajax success messagesuccess and error in ajaxdisplay a message on ajax successhow to show a success message after ajax callajax jquery success functionjquery ajax success resultjquery ajax without success functionajax success callback functionsuccess message in ajaxajax success message modelhow to get success data in ajaxjquery ajax done successajax success and error alert messageajax succes messagehow to display success message in javascript using jquery ajaxsuccess message ajaxhow to display success message in ajaxajax success function callbackhow to show a success message after ajax called successfullyhow to print success message in jqueryhow to show a success message when ajax called successfullyhow to show ajax success messagejquery success messageajax success message display exampleif ajax success show msgjquery ajax success functionshow message in ajax before successhow to use data ajax in success functionajax success message displayhow to to show success and error in ajaxshow success message in ajaxcall method in ajax successhow can i alert the result of ajax successhow to show a success message when ajax called successfully