I have following piece of code and I need to parse the response which according to my understanding actually saves in variable 'transferFlag'
but 'transferFlag' alerts the whole ajax code while
I need the response of that ajax call which is actually returning the value of method
'getStudentIdsForTransfer' ,
how to get the response of that method?
I am new to Ajax, Jquery, Jason that is why having some trouble in understanding.
var transferFlag=({
url: "UtilBean/getStudentIdsForTransfer",
handleAs: 'text',
data:
{
studentId: this.studentId
},
contentType: "application/json; charset=utf-8",
success: function(data) { var myValue = data.myValue; },
failure: function() { alert("Uh oh"); }
});
alert(transferFlag.toString()+ ".... Hi transfer Flag");