Opened 15 years ago

Closed 14 years ago

#1175 closed defect (wontfix)

The upload using the formNode with return type "text/javascript" gives IFrameTransportError" with JSON data.

Reported by: [email protected] Owned by: James Burke
Priority: high Milestone: 0.9
Component: IO Version: 0.3
Keywords: Cc:
Blocked By: Blocking:


When using the 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

Attachments (1) (2.0 KB) - added by [email protected] 15 years ago.

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by [email protected]

Attachment: added

comment:1 Changed 15 years ago by dylan

Milestone: 0.5

comment:2 Changed 15 years ago by dylan

Owner: changed from alex to James Burke

comment:3 Changed 14 years ago by guest


Try this patch

[email protected]:~/devel/publicart/prueba/dojo/src/io$ diff /home/lasi/Desktop/dojo-0.4.1-ajax/src/io/IframeIO.js IframeIO.js
<                                       var js = ifd.getElementsByTagName("textarea")[0].value;
>                                       var js = ifd.getElementsByTagName("pre")[0].innerHTML;
<                                       value = ifd.getElementsByTagName("textarea")[0].value;
>                                       value = ifd.getElementsByTagName("pre")[0].innerHTML;

My version is 0.4.1. Upgrade to it before apply the patch or do it manually.

comment:4 Changed 14 years ago by James Burke

Resolution: wontfix
Status: newclosed

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:

For 0.9, you have to explicitly call 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.

Note: See TracTickets for help on using tickets.