Opened 17 years ago
Closed 17 years ago
#125 closed defect (duplicate)
Could not insert custom parameters for Post methods while having form elements
Reported by: | knave | Owned by: | anonymous |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Core | Version: | 0.1 |
Keywords: | ajax version | Cc: | |
Blocked By: | Blocking: |
Description
dojo.io.bind is unable to mix both formNode and customised fields, as some occasions, it may be required.
e.g.
dojo.io.bind({ url: "test.php", formNode: document.getElementById("frm"), method: "post", mimetype: "text/plain", load: function( type, data, evt ) { alert(data); }, content:{ TO_ADD : "yes", TO_TEST: "yes" } });
Assumming the form has 2 hidden fields, it will submit as : MyField1=FIELD1Value&MyField2=FIELD2ValueTO_ADD=yes&TO_TEST=yes notice that the last element's value is concatenated with the custom content's first param's value.
should u use the following instead:
dojo.io.bind({ url: "test.php", mimetype: "text/plain", load: function( type, data, evt ) { alert(data); }, content:{ TO_ADD : "yes", TO_TEST: "yes" } });
, the output will be test.php?TO_ADD=yes&TO_TEST=yes& note that there is an extra "&" at the end.
Change History (2)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of 93, fixed. You can grab the latest nightly builds at http://archive.dojotoolkit.org.
Note: See
TracTickets for help on using
tickets.
Solved!
IO.js
BrowserIO.js Line 433. under this.bind function