i am using ajax to return json data. the script goes like this
var response;
$.post("GetResults", { Searchterm: Searchterm }, function (data) {
response = data;
});
while debugging i see that response is shown as undefined.
I dont want to use the code like below cause i want response to be used in multiple functions:
$.post("GetResults", { Searchterm: Searchterm }, function (data) {
var response = data;
});