Hello all,
I seem to be going in circles with something I would have to assume
would be simple. Im trying to return a value from the onSuccess
handler but it will not keep the value.
new Ajax.Request('./map/map.php?'+values,
{
method:'get',
onSuccess: function(transport)
{
var response = transport.responseText
|| "no response text";
},
onFailure: function(){
//
}
});
alert(response);
Obviously this does not work. How can I access the variable outside of
the onSuccess event? Or, how could I access an object within the
onSuccess handler from outside of this scope?
I realize I can access and change global variables, but I am trying to
keep everything within my class which is what is causing me such
problems. I have tried using Bind, Call, and Apply but I don't think I
am using them right...
Any help would be very much appreciated.
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---