Hi everyone,

here is my problem:
I would like to get a return value of test() given by the callback
function.
The problem I have is because the scope of the callback doesn't
interact with the test function so I'm not able to interact between
them.

here is my function:

Code:
function test(){
      $.ajax({
         type: "POST",
         url:"/ajax/test/",
         data: { ...]
         dataType: "json",
         success: function(data){
            return true;

         }
      });
   }
}


How would be possible to get the return value of the callback function
in test() function in order to make something like:

Code:
function test(){
      return $.ajax({
         type: "POST",
         url:"/ajax/test/",
         data: { ...}
         dataType: "json",
         success: function(data){
            return true;

         }
      });
   }
}


In advance thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to