Opened 15 years ago
Closed 14 years ago
#800 closed defect (fixed)
Button widget cannot submit forms
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | Widgets | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
It's not possible to use the dojo::Button as the triggering mechanism to submit a form. For example, changing line 84 of the dojo.io.FormBind? example (http://mastodon.dojotoolkit.org/~david/formBind/):
<input type="submit" name="save" value="Save" />
into something like:
<button dojoType="Button" onclick="document.myformname.submit(); return false;" id="buttonId" >save</button>
When I try to apply this change it does not pass through the FormBind? handlers (nor load, nor onsubmit).
Presumably there needs to be a hidden <button> object that gets pressed when the button is clicked.
Change History (5)
comment:1 Changed 15 years ago by
Milestone: | 0.4 → 0.5 |
---|
comment:2 Changed 14 years ago by
Owner: | changed from anonymous to dylan |
---|---|
Status: | new → assigned |
Actually, event handlers are used here... the main issue I see with firefox at least is that your form still has to have a submit button, even if it is hidden, for it to be possible to submit a form. I'll add this to dojo.book and close.
comment:3 Changed 14 years ago by
Component: | Widgets → Documentation |
---|---|
Milestone: | 0.5 → 0.4 |
comment:4 Changed 14 years ago by
Component: | Documentation → Widgets |
---|---|
Milestone: | 0.4 → 0.5 |
Owner: | changed from dylan to bill |
Status: | assigned → new |
Actually, the reason I wrote this bug is because I don't want users to have to have a hidden submit button. If you think about degradability (if javascript is disabled), and also ease of use, then it's clear that
<button dojoType="Button" type="submit">
needs to work the same as
<button type="submit">
I tried to write the contract here: http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book44
Anyway, I can deal with this bug for 0.5.
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This should be fixed with the new Button widget
event handlers do not get transferred to the dom node here... should they be copied in?