Im trying to return the value that a $ajax call returns, from a function but it only returns \"undefined\". If a alert the \"reponse\" from the ajax call it returns the rigth va
$.ajax({
type: "POST",
url: "/Admin/GetCandidateName/",
data: { 'candidateID': candidateID },
success: function(response) {
return response;//USE THIS
//THIS WILL RETURN FROM THE FUNCTION WITHOUT RETURNING ANY VALUE
//return;
},