Hi,

You need to bind your onSuccess function to 'this', more here:

http://proto-scripty.wikidot.com/prototype:tip-using-an-instance-method-as-a-callback-or-event-handler

http://blog.niftysnippets.org/2008/04/you-must-remember-this.html

http://www.alistapart.com/articles/getoutbindingsituations

HTH,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Feb 6, 10:45 am, marioosh <[email protected]> wrote:
> I have Channel class with element field, but i don't know how in
> Ajax.Updater get to this field. Is this possible without passing
> another parameters to method updateById ?
>
> var Channel = Class.create({
>   initialize: function(element) {
>     this.element = $(element);
>   },
>
>   updateById: function (idch) {
>     new Ajax.Updater(this.element,'getbyid.php',{
>       parameters: {id_channel: idch},
>
>       onSuccess: function() {
>           // HOW GET ELEMENT HERE ?
>           // this... <--- Ajax.Updater object i mean...
>           // this.element not good
>       },
>      ...
>
> }
>
> ps: sorry for my english ;)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to