Hello:
I've been trying to use Ajax.Request(). The following is my code:
function retrieveProjectPermissions(stateDataID, projectID) {
new Ajax.Request('/gallupFaith/me25/
ProjectPermissionsAjaxAction.action',
{
method:'get',
parameters: {statedataid: stateDataID, projectid: projectID},
onSuccess: function(transport){
var responsePP = transport.responseText;
alert("Success! \n\n" + responsePP);
if (agentPP.indexOf('msie') != -1) {
var permissionArray = msPopulatePP(responsePP);
return permissionsArray;
}
else if (agentPP.indexOf('mozilla') != -1) {
var permissionArray = nonMSPopulatePP(responsePP);
return permissionsArray;
}
},
onFailure: function(){ alert('Something went wrong...') }
});
}
I am trying to return the variable permissionsArray to the caller of
retrieveProjectPermissions(). I can't use global variables because
there is some timing issue . . . the variables always end up undefined
after I set them. How can I return permissionsArray?
Thanks
Eric-
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---