#4905 closed defect (fixed)
IE7: DateTextBox submitting muliple values for one 'name'
Reported by: | Adam Peller | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Dijit - Form | Version: | 0.9 |
Keywords: | Cc: | Adam Peller, haysmark | |
Blocked By: | Blocking: |
Description (last modified by )
reposted from http://dojotoolkit.org/forum/dijit-dijit-0-9/dijit-support/datetextbox-submitting-muliple-values-ie-only
works fine in FF, but not in IE7
<html> <head> <title>Simple Date Form</title> <link href="dojo/resources/dojo.css" type="text/css" rel="stylesheet"/> <link href="dijit/themes/tundra/tundra.css" type="text/css" rel="stylesheet"/> <script src="dojo/dojo.js" type="text/javascript" djConfig="parseOnLoad: true"></script> <script type="text/javascript"> dojo.require("dijit.form.DateTextBox"); </script> </head> <body class="tundra"> <form> Select a date: <input type="text" dojoType="dijit.form.DateTextBox" name="mydate" /> <input type="submit" value="go" /> </form> </body> </html>
Sample result query string: "?mydate=10%2F27%2F07&mydate=2007-10-27"
Change History (10)
comment:1 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Summary: | DateTextBox submitting muliple values for one 'name' → IE7: DateTextBox submitting muliple values for one 'name' |
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
Status: | new → assigned |
---|
comment:4 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [11169]) Fixes #4905. Set JS object name value to "". Problem can be seen with any subclass of MappedTextBox?. Workaround for existing users is to subclass the erring text box class (datetextbox) and to set this.textbox.name="" after calling the superclass postCreate().
comment:5 Changed 13 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I checked on IE6. I bring up the test page, select a date, and then hit go. The address bar changes to:
file:///C:/workspace/dijit/4905.html?=07%2F10%2F18&mydate=2007-10-18
(Haven't tried over http, perhaps there is a difference? Seems doubtful though) Can you take another look?
comment:6 Changed 13 years ago by
PS: if you changed the name to mydate_displayed or something like that I wouldn't be too worried (it would still be unfortunate to submit the diplayed value at all), but I'm just worried that web servers will get tripped up by submitting a value with a null name, and also I wonder how a POST request with a null name would look.
comment:7 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:8 Changed 13 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The fix seems to break Filteringselect
comment:9 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:10 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
I looked at this a bit; I'll grab the bug if Doug isn't already working on it.
As per _FormWidget::attributeMap, name gets assigned to the displayed <input> field, and then MappedTextBox? mixin tries to move the name attribute to the hidden <input> field, but the removeAttribute() call doesn't work well on IE (nor does textbox.name="").