-
29 Jun 2012 1:09 AM #1
Internet explorer form submit bug
Internet explorer form submit bug
Ext version tested:
- Ext 4.1
- IE9 (so probably lower then IE9 too)
- When submitting a form, the failure handler is never called
- Submit a form to a REST service which produces the following JSON {success: false, message: 'Import failed'}
- The failure handler of form submit to be called
- The success handler of form submit is called
Debugging already done:Code:form.submit({ url: myUrl, success: function(form, action) { panel.down('form[name=qualityReportForm]').down('button').setDisabled(true); showInfo("Import succeeded!"); }, failure: function(form, action) { panel.down('form[name=qualityReportForm]').down('button').setDisabled(true); showError(action.result.message); } });- Yes: IE9 throws an 'Access is denied' exception on the following code (Part of onUploadComplete from form submit). Because of this exception, the attribute 'success: false' of my JSON response is not handled, therefore the failure handler is not called.
Possible fix:Code:doc = frame.contentWindow.document || frame.contentDocument || window.frames[frame.id].document;
- No clue
- Windows 7
-
29 Jun 2012 1:44 AM #2
Well, I changed my rest service so that it now throws a bad request status (400).
And still the success handler is called, so I really think this is a bug within ExtJS.
EDIT : This is not an ExtJS bug, but an IE bug. IE doesn't allow javascript to read those properties. I don't really think there's a solution to this bug.
-
29 Jun 2012 3:24 PM #3
Yes, if you're posting to a different domain it will cause issues.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
3 Jul 2012 2:17 AM #4
Internet Explorer 6/7 incorrectly handle a form submission with the <button/> element.
Consider <button name="action" value="next">Go to step 3</button> <button name="action" value="back">Back to step 1</button>
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote