6
Estoy probando ExtJS4, pero necesitan un poco de ayuda aquí ...ExtJS4 - Ext.dom.Element y fireEvent
tengo este código HTML:
<input type="button" value="Click" id="sendButton">
<input type="text" id="tbox">
Y este código de script:
Ext.addBehaviors({
'#[email protected]': function(){
alert("Test");
}
});
Ext.get('tbox').on('keydown', function(e){
if(e.keyCode == Ext.EventObject.ENTER){
//Ext.select('#sendButton').fireEvent('click');
//Ext.get('sendButton').fireEvent('click');
// this is what I need working....
}
});
Solo quiero, cuando presiona enter en un cuadro de texto, actuará como si hubiera presionado el botón.
¿Alguien puede ayudar?