PDA

View Full Version : how to send params with "on"



Grimsk
10 Aug 2007, 5:08 AM
is it possible to send params with this line :


senderFunction: function(){
var myParamsToSend;
Ext.get( 'sliderNext' ).on( 'click', this.next );
...
next: function(){
...
}

Animal
10 Aug 2007, 5:09 AM
http://extjs.com/deploy/ext/docs/output/Function.html#createDelegate

BernardChhun
10 Aug 2007, 5:10 AM
Ext.get( 'sliderNext' ).on( 'click', this.next.createDelegate(this, [params1, params2]) );

:)

Grimsk
10 Aug 2007, 5:15 AM
thnks berny and the beast !:)