Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment