Tuesday, September 4, 2012

JQuery return data after ajax call success


function CallAjax() {
    var result="";
    $.ajax({
      url:"ajaxpath",
      async: false,  
      success:function(data) {
         result = data; 
      }
   });
   return result;
}