I've been trying to use Ajax.Request().  The following is my code:

function retrieveProjectPermissions(stateDataID, projectID) {

    new Ajax.Request('/gallupFaith/me25/
        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?


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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to