am working on a project and i found a little problem with my ajax request which am finding hard to fix. i want to perform multiple ajax requests, in that i mean: i need to perform an ajax request, and if its successful, i will perform another ajax request within the success handler.
here is a sample of my code:
var result;
$.post('make_payment.php',{password:pass,amount:50},function(data){
result=data;
if(result=='success'){
$.ajax({
type:'post',
dataType:"json",
url:"save_info.php",
success: function(data){
if(data.result=='success'){
alert('success');
}
},
error:function(){
alert('failed');
}
});
}
})
This works pretty good on mozilla firefox and google chrome, but does not work on internet explorer and apple safari. pls i need an assistance on how to make it work on all browser.