Hi scramatte,

have you tried this?

function test() {
 var a = 'test';

 new Ajax.Request('/myurl',
 {
  method:'get',
         onSuccess: function(transport) {
      alert(a);
         }
 }

 }

this should work!

bye,
  Orla


On 12/04/07, scramatte <[EMAIL PROTECTED]> wrote:
>
>
> When I made an Ajax Request,  how can I access to parent context
> inside onSuccess callback.
> I  mean that in the example below I would like to get  value of  var
> "a"
>
>
> function test() {
>
> var a = 'test';
>
> new Ajax.Request('/myurl',
> { method:'get',
>              onSuccess: function(transport) {
>                   alert(this.url);
>              }
> }
>
> }
>
>
> Any 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 [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to