PDA

View Full Version : FormPanel JS error in IE



mclovin
30 Jan 2011, 2:57 PM
Hello - I am having an issue with a form that I am submitting. This is only an issue in IE (works in Firefox). The request does submit, but it throws a JS error. Here is the code:



var myForm = new Ext.form.FormPanel({
renderTo:'patient-form',
id:'patientForm',
width:650,
title:'Request Form',
url:'mypage.php',
items:[{
xtype:'textfield',
fieldLabel:'My Name',
name:'myname'
}],
buttons: [{
text: 'Submit Request',
handler: function() {
// This is what seems to be causing the problem....
patientForm.getForm().submit({
success: function(form, action) {
Ext.MessageBox.alert('Status', 'Request Successful!');
},
failure: function(resp,opt) {
Ext.MessageBox.alert('Status', 'There was an error');
}
});
}
}]
});


Any insight on what is causing the JS error?
Thanks,
-Jim

1 Feb 2011, 5:11 AM
Jim, patientForm !== myForm.