Closed
Bug 63752
Opened 25 years ago
Closed 25 years ago
form submission fails when submit-ing using javascript
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: gerbrand, Assigned: jst)
References
()
Details
(Keywords: testcase)
Attachments
(2 files)
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20001211
BuildID: 2000121104
When I hit the submit button with Javascript turned ON, the submit button won't
work.
The submit button will lauch some javascript:
<INPUT TYPE=BUTTON VALUE="Go"
onClick="top.location.href=this.form.webdev.options[this.form.webdev.selectedIndex].value">
I suspect the 'this' doesn't work correctly, or the button won't submit when an
onclick event is specified
Reproducible: Always
Steps to Reproduce:
Go the the specified URL, or create a form whith a submit button which contains
an onclick event with this.form....
Actual Results: Javascript code should be lauched, after that it should be submited
Comment 1•25 years ago
|
||
According to validator.w3.org there is no TYPE specified for the SCRIPT so
Mozilla probably is just ignorning it. Looks like bad coding to me rather then a
Mozilla problem. Thoughts?
Comment 2•25 years ago
|
||
A simplified testcase with the form and the javascript created submit button
that includes an onclick event switches pages as expected.
I'm not quite clear on what is the bug here. Is the bug that the form is never
submitted in this case? This would seem desireable as the onclick event in this
example tell mozilla to change pages and I would think the onclick should occur
before the form submission. Or is the bug that it's not properly processing the
onclick code?
My simplified testcase does behave differently than the URL linked above. My
testcase processes the onclick event. The code at the URL doesn't seem to. I'll
see if I can figure out what's going on here.
Comment 3•25 years ago
|
||
Comment 4•25 years ago
|
||
Comment 5•25 years ago
|
||
I was narrowing it down also. The difference between working and not working is
the non-working example has:
<a name=top></a>
So the button:
<INPUT TYPE=BUTTON VALUE="Go"
onClick="top.location.href=this.form.webdev.options[this.form.webdev.selectedInd
ex].value">
finds the anchor "top" instead of the "top" of the document.
reassigning to jst or maybe he will know where it goes.
Assignee: rods → jst
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Comment 6•25 years ago
|
||
Yup, this one belongs with me, or it's really a dup of one of my other bugs so
I'm duping this...
*** This bug has been marked as a duplicate of 57626 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Updated•7 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•