Closed
Bug 247745
Opened 21 years ago
Closed 21 years ago
submit of form failed when using submit() in onclick event
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 242557
People
(Reporter: korbs, Assigned: bugzilla)
References
Details
(Keywords: regression)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040619 Firefox/0.8.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040619 Firefox/0.8.0+
submitting a form seems to fail in html files where an onclick javascript event
is used with the submit() handler
eg: the code <a href="#" onClick="submit()">
when the link is clicked JavaScript Console reports "Error: Submit Is Not Defined"
problem didnt used to occur in builds of 0.7 i'd tested
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Actual Results:
Form did not submit, page did not refresh (just acted like a normal # href)
Expected Results:
submitted form
Comment 1•21 years ago
|
||
i'm pretty sure (although not positive) that you need to tell it which form to
submit.
for example:
- you have a form named loginForm
- to submit this form you would do loginForm.submit() for the onclick event
- or if you were in the form you could do this.submit() (i think)
Comment 2•21 years ago
|
||
<a href="#" onClick="submit()">
is completely invalid, try
<a href="#" onclick="document.forms['forname'].submit()">
--> INVALID
Please reopen if you can reproduce this with a nightly build and a minimized
testcase showing the bug
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Comment 3•21 years ago
|
||
*** Bug 216747 has been marked as a duplicate of this bug. ***
Comment 4•21 years ago
|
||
*** Bug 247026 has been marked as a duplicate of this bug. ***
Comment 5•21 years ago
|
||
*** Bug 250353 has been marked as a duplicate of this bug. ***
Comment 6•21 years ago
|
||
From one of the dups: This is a regression since Mozilla 1.6.
Status: RESOLVED → UNCONFIRMED
Component: General → DOM
Flags: blocking-aviary1.0?
Keywords: regression
Product: Firefox → Browser
Resolution: INVALID → ---
Version: unspecified → Trunk
![]() |
||
Comment 7•21 years ago
|
||
This is a duplicate of the "scope chain for nodes inside forms no longer
includes the form" bug. Please find the original and mark this duplicate.
Whiteboard: DUPEME
Comment 8•21 years ago
|
||
I tried to find it but couldn't. Do you know anything else about it, like who
owns it or what component it is in?
![]() |
||
Comment 9•21 years ago
|
||
jst owns it, I would think, and it should be in DOM0.
It's fallout from bug 147058.
I'm not quite sure what good search terms would be, though....
![]() |
||
Comment 10•21 years ago
|
||
Actually, bug 242557 is what I was thinking of.
*** This bug has been marked as a duplicate of 242557 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → DUPLICATE
Updated•21 years ago
|
Flags: blocking-aviary1.0?
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•