Hi,

I have a function Ajax.Responders , but i can't catch the paramater "this"
and i can't modify the value of the parameter "this".

the result
>one : the value is 'url'
 >two :  equal *"no_good"*
> three : undefined

I try to find a solution, I think that in javascript , the transfert of a
global variable(this) is not possible, do you have a solution ? or a
explication ?

Code ----------------------------------------------------------------------

*this.element = 'url';
this message = 'no_good';

trace(this.element);  > one

Ajax.Responders.register({
                onComplete: function (xhr, json){
                  if (json) {
                    var str = '';
                    json.each(function (item) {
                          str += item.reponse;
                        });
                    this.message = str;  > two
                    trace(this.element);  > three

                  }
                }
});
*
Code
------------------------------------------------------------------------

thanks,

Laurent

-- 
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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to