Opened 12 years ago
Closed 12 years ago
#7699 closed defect (invalid)
iframe.send not work with form arguments
Reported by: | jgnan | Owned by: | James Burke |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | IO | Version: | 1.1.1 |
Keywords: | iframe | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description
iframe.send not work with form args.
Error occurs like this:
dojo.io.iframe.send({ "form":dojo.byId("uploadform"), "handleAs": "html", "handle":function(resp,ioArgs){ if(resp instanceof Error){ console.debug("Request FAILED: ", resp); }else{ importDlg.setContent(resp.body.innerHTML) } } });
Errors will be thrown in dojo._ioSetArgs in the following code block:
if(args.form){ var form = _d.byId(args.form); var actnNode = form.getAttributeNode("action"); ioArgs.url = ioArgs.url || (actnNode ? actnNode.value : null); formObject = _d.formToObject(form); }
The form is always undefined. It seems that the created iframe try to get the form from inside but the form I put is outside. This make form data missing when going up to the server, and POST method doesn't work either.
My dojo version is 1.1.1, please help me with it.
Change History (3)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Please close this ticket, I found this is a mistake maken by myself because I'd changed the form in somewhere I did not realized.
Sorry for bordering
comment:3 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
just to note: you can pass a string id for the form: value (no need for dojo.byId)
Er....For my last try, I found if you put an exists form node outside the iframe.send method block into the "form" argument place, the method can run, the form is submited either, but the response is not correct. The worse of it, I found it didn't pass through the server side at all.