T
Tyler
Hi all,
I am using some components from a JS library (scriptalicious), where
callback functions are arguments to the constructors of the components
like so:
someClass x (name)
{
this.name = name;
this.slider = new
Control.Slider(this.name+'slide',this.name+'track',{
onSlide:function(v){foo()},
onChange:function(v){bar(v)}
);
}
Since I would like to dynamicaly create these components at runtime, I
would like the engine (the browser) to evaluate the value of a member
variable (this.name) and to pass this to the callback of the event,
like
.... onChange:function(v){bar(this.name)} ...
Is this possible by some escaping mechanism or so? (and am I making
myself clear enough?)?
Thanks a lot in advance
I am using some components from a JS library (scriptalicious), where
callback functions are arguments to the constructors of the components
like so:
someClass x (name)
{
this.name = name;
this.slider = new
Control.Slider(this.name+'slide',this.name+'track',{
onSlide:function(v){foo()},
onChange:function(v){bar(v)}
);
}
Since I would like to dynamicaly create these components at runtime, I
would like the engine (the browser) to evaluate the value of a member
variable (this.name) and to pass this to the callback of the event,
like
.... onChange:function(v){bar(this.name)} ...
Is this possible by some escaping mechanism or so? (and am I making
myself clear enough?)?
Thanks a lot in advance