you could use the Function Constructor. I have never used it but it might
work.
var changeEvent = new
Function(this.element.getProperty('onchange')).bind(this);
--
Fábio Miranda Costa
Solucione Sistemas
Engenheiro de interface
On Tue, Oct 20, 2009 at 1:55 AM, Steve Onnis <[email protected]> wrote:
>
> I have been writing a class to replace select boxes with custom UL select
> boxes and i am trying to get my code to fire the onchange that is on the
> selectbox
>
>
> What i tried was this...
>
> this.options.onchange = !options.onChange ? (function ()
> {this.element.fireEvent("change")}.bind(this)) :
> options.onChange.bind(this);
>
> and then i have this on the click event of the list
>
> this.options.onchange.run();
>
> The function ran but the event didn't fire
>
> The only way I could get it to work is by using this which I didn't think
> was ideal
>
> (function () {eval(this.element.getProperty("onchange"))}.bind(this))
>
> Am I doing something wrong here?
>
> Steve
>
>