I am unable to check if my code is wrong or there is any syntax error here. I spent more time so thought of asking in stackoverflow.
$(document).ready(function () {
AjaxGet = function (url, storeageLocation, mySuccessCallback) {
var result = $.ajax({
type: "GET",
url: "/Regions/GetView",
async: true,
contentType: 'application/json',
dataType: "html",
success: function (viewData) {
alert(viewData);
storeageLocation = viewData;
mySuccessCallback(viewData);
},
error: function (xhr, ajaxOptions, thrownError) {
}
}).responseText;
return result;
};
alert(result);
});