This function wont return any value, even though the ajax call goes through correctly
Function:
function queryData(request)
{
var ret = null;
$.ajax({
url: 'ajax.php',
data: 'requestdata='+request,
dataType: 'json',
type: 'post',
success: function (j) {
if(j.ok == true)
return j.data;
else
return 'error';
}
});
return 'error';
}