Hi below is the code, i am calling GetAjaxComments function which sends ajax request and successfull completed but i am not getting any values in response (eg:server side function returned DbComment ="comment already exist"). Please help.
function GetAjaxComments(sEmployeeCompensationID, iInfoType) {
$(document).ready(function() {
var json = "{'EMPLOYEECOMPENSATION_ID':'" + sEmployeeCompensationID
+ "','iInfoType':'" + iInfoType
+ "'}";
var ajaxPage = "AjaxGridRowSave.aspx?SaveRow=2"; //this page is where data is to be processed
var options = {
type: "POST",
url: ajaxPage,
data: json,
contentType: "application/json; charset=utf-8",
dataType: "json",
async: false,
complete: function(data) {
},
error: function(msg) {
if (msg.statusText != "OK") {
OpenInfoPopup("Alert", "Error occured while retriving data.");
}
}
};
});
var returnText = data;
if (returnText != '') {
var dbValues = new Array();
dbValues = eval('(' + returnText + ')');
if ((dbValues1.DbComment) && (dbValues1.DbComment != null) && (dbValues1.DbComment != '')) {
switch (dbValues1.iInfoType) {
case 1: OpenInfoPopup('Eligibility Override Reason', dbValues1.DbComment); break;
case 2: OpenInfoPopup('Eligibility Override Rejection Reason', dbValues1.DbComment); break;
case 3: OpenInfoPopup('Rejection Reason', dbValues1.DbComment); break;
case 4: OpenInfoPopup('Guideline Override Reason', dbValues1.DbComment); break;
case 5: OpenInfoPopup('Guideline Override rejection Reason', dbValues1.DbComment); break;
case 6: OpenInfoPopup('Pay Range Override Reason', dbValues1.DbComment); break;
case 7: OpenInfoPopup('Pay Range Override Rejection Reason', dbValues1.DbComment); break;
}
}
}