How can I modify the below function to properly return isSuccess?
Right now it just returns null, which is expected. I want the call to
still be asynchronous, but I don't want the function to return until
isSuccess is set.
Database.prototype.CreateContentCampaign=function()
{
var isSuccess;
new Ajax.Request(url,
{
onSuccess: function(resp)
{
isSuccess=true;
},
onFailure: function(resp)
{
isSuccess=false;
}
});
return isSuccess;
};
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" 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/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---