Running two .ajax()
As title, I have two ajax() has to go through but in condition that A ajax has to be go through in order to do B ajax.
A ajax as in <<=== .ajaxFileupload()
B ajax as in <<=== .ajax()
Any recommend to do the condition so that A must be success in order to do B ?? or any met开发者_StackOverflow社区hod that I shall implement ?
To alex:
u mean something like this ??
$.ajaxFileUpload({
.....
.....
success:function(data){
$.ajax({
});
}
});
Call B inside of the success handler for A..
$.ajaxA({
url: "test.html",
context: document.body,
success: function(){
$.ajaxB....
}
});
jQuery Ajax API docs for more info on the success method.
On the complete
callback of A ajax, make the B ajax call.
精彩评论