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
Add an async true attribute to your .ajax call:
type: "POST", async: false, // ADD THIS url: "/Admin/GetCandidateName/",
Also, you left off an "s" on success.
That may do it.