Is there any way I can run this code with async:false? I notice the jQuery manual specifies that it must be true, when passing the call return to a variable, but that is painful considering the method is meant to be generic.
ajaxCall.classFunction = function( $class, $function, $params){
//Ensure no errors occured
$params = typeof($params) != 'undefined' ? $params : false;
//Ajax Call for data
var $r =$.ajax({
type: 'POST',
url: 'json.php?c='+$class+'&func='+$function,
data: $params,
timeout:5000,
async:false,
}).responseText;
return $r;