Two thoughts:
1) Add an onException handler as well, and make sure there are no
errors. If for some reason an exception is thrown, neither onSuccess
or on Failure will be called. (The url you''re passing for example,
or trying to pass a ''localhost'' url in IE7, or a URL for a
domain
different than your current one, might all be reasons for exceptions.)
2) Make sure you''re getting a value for json in your onSuccess
callback.
TAG
On Feb 23, 2007, at 9:20 AM, Clamp wrote:
>
> Ok, I''m hitting my head against the well for a cople of hours and
> already tried searching this, but nothing.
> Ok I''m going directly to the code:
>
> <script>
> var proc = new Array();
>
> new Ajax.Request(''url'', {
> method:''get'',
> parameters: {id: id},
> onSuccess: function(transport, json){
> proc.push($H(json));
>
> },
> onFailure: function(){
> console.debug(''Something went wrong...'')
> }
> </script>
>
> The problem, I only want to put the Ajax.Request result in a outside
> variable. "proc" in this example, I really need ideas :)
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---