PDA

View Full Version : FormPanel => Enter key doesn't submit in Firefox



Kutu
29 Aug 2008, 2:14 PM
Seems that pressing enter on a FormPanel doesn't result a submission (only in Firefox).

jgreenwell@oreck.com
29 Aug 2008, 6:00 PM
I don't know if it will help you or not, but here is a sample bit of code that I use (originating from another example somewhere) and this code works well in all browser that I have tested (IE, FF, Safari). I hope this will help you, and if not, perhaps this may prompt someone else to chime in to set me straight.




keys: [{
key: [Ext.EventObject.ENTER],
fn: function(){
if(Ext.getCmp('btnSubmit').disabled) return;
myPanel.getForm().submit({
method:'POST',
waitTitle:'Connecting',
waitMsg:'Sending data...',
success:function(){
// post was successful, do something useful
},
failure:function(form, action){
if(action.failureType == 'server'){
obj = Ext.util.JSON.decode(action.response.responseText);
Ext.Msg.alert('Submission failed', obj.errors.reason);
} else {
Ext.Msg.alert('Warning!', 'Server is unreachable : ' + action.response.responseText);
}
myPanel.getForm().reset();
}
});
}
}]

gslender
30 Aug 2008, 5:12 AM
I don't know if it will help you or not, but here is a sample bit of code that I use (originating from another example somewhere) and this code works well in all browser that I have tested (IE, FF, Safari). I hope this will help you, and if not, perhaps this may prompt someone else to chime in to set me straight.


As this is the Java GWT version of ExtJS, I don't think a Javascript example really helps... /:)

jgreenwell@oreck.com
30 Aug 2008, 12:22 PM
As this is the Java GWT version of ExtJS, I don't think a Javascript example really helps... /:)

Whoops! Your right, my bad. I didn't realize I posting to the GWT... sorry! (dang, and here I thought I was being so helpful :-? )

Kutu
31 Aug 2008, 8:23 PM
Oops sorry, this bug was supposed to be in GXT forum