PDA

View Full Version : [solved] Problem passing variables to a handler function using the "on" function



samax
8 Jun 2009, 2:56 AM
Hello,
I've a problem passing a variable to a handler function using the "on" function.
Here is the use of the "on" function:

searchBox.on("beforequery", this.handler, null, [{test: 'value'}]);the handler is as this:


onFiltering : function(e) {
...
}
How can I retrieve the value of the "test" variable passed by the "on" function in my handler function?

Thank you.

Animal
8 Jun 2009, 3:03 AM
Use createDelegate

samax
8 Jun 2009, 5:11 AM
Thank you it works fine!