Opened 14 years ago
Closed 13 years ago
#1175 closed defect (wontfix)
The dojo.io upload using the formNode with return type "text/javascript" gives IFrameTransportError" with JSON data.
Reported by: | Owned by: | James Burke | |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | IO | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When using the dojo.io upload that contains a formNode property with return type "text/javascript" I keep getting a "IFrameTransportError" in the data item that is returned. The form being submitted contains an element with the input type of "file". The upload is performed properly, but when the JSON return is sent, I get the "IFrameTransportError" in the data item.
The form upload and return evaluates the JSON properly if the form doesn't contain an element with the input type of "file"
To reproduce the problem I have attached 3 jsp files. One that works (mark_works.jsp), one that doesn't (mark_fails.jsp) and the server side jsp that return the JSON syntax (mark_lookup.jsp).
I am using Dojo 0.3.1 with Firefox 1.5.0.5
Attachments (1)
Change History (5)
Changed 14 years ago by
comment:1 Changed 14 years ago by
Milestone: | → 0.5 |
---|
comment:2 Changed 14 years ago by
Owner: | changed from alex to James Burke |
---|
comment:3 Changed 14 years ago by
comment:4 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
This is working as designed. When using an input type of file, then the IframeTransport? is used, and that transport requires sending the response inside a textarea element inside of an HTML document. This is the only way we get a load notification across browsers when the response is sent.
More info here: http://dojotoolkit.org/book/dojo-book-0-4/part-5-connecting-pieces/i-o/transports/iframe-i-o
For 0.9, you have to explicitly call dojo.io.iframe if you want to deal with forms that have input type files in them. Hopefully this will help make it clearer that the special HTML wrapped return is required.
Hi
Try this patch
My version is 0.4.1. Upgrade to it before apply the patch or do it manually.