
Untitled
By: a guest on
Apr 29th, 2012 | syntax:
None | size: 0.81 KB | hits: 16 | expires: Never
Javascript out function
function foo(arg, ajaxcomplete) {
$.ajax({
//ajaxcall...
success: function() {
//set ajaxcomplete to true
}
}
function foo(arg, ajaxcomplete) {
$.ajax({
success: function() {
alert('O.K.');
},
complete: function(){
alert('We are done');
}
});
}
function foo(arg, ajaxcomplete) {
$.ajax({
//ajaxcall...
complete: function() {
ajaxcomplete();
// Some other code here if required
}
}
var isComplete = false;
foo('someArg', function() { isComplete = true; });
function foo(arg, ajaxcomplete) {
$.ajax({
//ajaxcall...
success: function() {
},
complete: function(){
//set ajaxcomplete to true here
}
}