#6264 closed bug (duplicate)
.submit() silently fails if the form has a <input name="submit">
Reported by: | gnarf | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.4.3 |
Component: | event | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
.submit() silently fails if the form has a <input name="submit"> or <input id="submit">
The event trigger function tries caling target[ type ] as a function without first checking to see if it is really a function.
On a form with <input type="submit" name="submit"> form.submit could be the submit button.
If it is, it might be smart to just trigger a "click" on it and hope for the best.
Change History (6)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
This might be a better solution for when target[type] is not a function:
document.createElement(target.nodeName)[type].apply(target)
comment:3 Changed 13 years ago by
This occurs for any element with the name of a form element property (length, action, method, etc.)
comment:5 Changed 13 years ago by
Priority: | → undecided |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
subscribing for change notification