Opened 13 years ago
Closed 13 years ago
#5755 closed defect (invalid)
Form submit doesn't work after dojo.io.iframe.send
Reported by: | guest | Owned by: | anonymous |
---|---|---|---|
Priority: | high | Milestone: | future |
Component: | General | Version: | 1.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
I use the send function like this :
dojo.io.iframe.send({url: 'x.do?method=setVal,
form: document.forms[0], handleAs: "application/json",
...
The send function of dojo.io.iframe call _fireNextRequest. This function ends with the foolowing instruction :
fn.target = this._iframeName;
This means that the target of the form passed to the send() function is overwritten each time I call the send function.
The result is that any call to the submit function of the form will be redirected to the hidden IFrame.
Change History (5)
comment:1 follow-up: 2 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 follow-up: 5 Changed 13 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
I don't agree with you, my page is composed of two parts :
- a classic one with text inputs
- a specific with file upload
I use dojo.io.iframe.send to send the files contents immediatly without waiting the user general submit on the page. Then after each use of dojo.io.iframe.send I have to reset the main form target...
Ektor
Replying to jburke:
The goal of dojo.io.iframe.send() is to send requests to the server (normally involving input type=file fields) without showing any UI, so it uses a hidden frame to do the work.
Normally, your app logic should be catching all submit actions, and deciding whether to call dojo.io.iframe.send() or to do a different path. If using a different path, then your app code can set the target before following that path.
I'm going to close this for now as working as designed, but feel free to reopen if you can provide more information on why this behavior is a problem.
comment:3 Changed 13 years ago by
Milestone: | → 1.2 |
---|
comment:4 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Milestone: | 1.2 → future |
comment:5 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
Replying to guest:
This sounds to me like an application architecture issue and not an issue with the iframe API. The target and single iframe usage is by design; given those constraints, I would suggest that changing the target with each form submit seems like the solution for your specific problem.
Closing this out as jburke did.
I don't agree with you, my page is composed of two parts :
- a classic one with text inputs
- a specific with file upload
I use dojo.io.iframe.send to send the files contents immediatly without waiting the user general submit on the page. Then after each use of dojo.io.iframe.send I have to reset the main form target...
Ektor
Replying to jburke:
The goal of dojo.io.iframe.send() is to send requests to the server (normally involving input type=file fields) without showing any UI, so it uses a hidden frame to do the work.
Normally, your app logic should be catching all submit actions, and deciding whether to call dojo.io.iframe.send() or to do a different path. If using a different path, then your app code can set the target before following that path.
I'm going to close this for now as working as designed, but feel free to reopen if you can provide more information on why this behavior is a problem.
The goal of dojo.io.iframe.send() is to send requests to the server (normally involving input type=file fields) without showing any UI, so it uses a hidden frame to do the work.
Normally, your app logic should be catching all submit actions, and deciding whether to call dojo.io.iframe.send() or to do a different path. If using a different path, then your app code can set the target before following that path.
I'm going to close this for now as working as designed, but feel free to reopen if you can provide more information on why this behavior is a problem.