I have two problems here, 1st the code below won't work, anybody could tell me what am i missing? 2nd, i want to return the value from php to success function and then that value also will be returned to the parent function...
function myFunc(e){
    $.ajax({
        type: "post",
        url: "path/myPhp.php",
        data: "val="+e,
        dataType: "php",
        success: function(result){
            return result; //i want this result to be returned to parent function myFunc(e)
        },
        error: function(e){
            alert('Error: ' + e);
        }
    }); 
}
 
     
     
     
     
     
    