this may sound very easy to few of you, but i am not able to figure out why I am not able to get the return value, even after chceking many posts :(
function
function ajax_call(url,data){ return $.ajax({ type: "POST", url: url, data: data, async:false, success: function(status){ } }).responseText; }
Now you will get the response text from server side via ajax call