Closed
Bug 148248
Opened 22 years ago
Closed 22 years ago
image named 'submit' inside of form shadows the method form.submit()
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INVALID
mozilla1.0.1
People
(Reporter: bc, Assigned: jst)
References
()
Details
(Whiteboard: [HAVE FIX])
Attachments
(3 files, 2 obsolete files)
219 bytes,
text/html
|
Details | |
3.46 KB,
patch
|
vidur
:
superreview+
|
Details | Diff | Splinter Review |
539 bytes,
text/html
|
Details |
The url contains a page with a form named |investForm| which contains a link around an image that is named |submit|. document.investForm.submit points to the image and not the submit function for the form. This does not agree with Nav4.
Reporter | ||
Comment 1•22 years ago
|
||
Assignee | ||
Comment 2•22 years ago
|
||
For backwards compatibility reasons with 4x we can't not expose images by their name on form objects, but we can special case form.submit to never be shadowed by any form controls or images on a page. Morphing bug...
Status: NEW → ASSIGNED
OS: Windows 2000 → All
Hardware: PC → All
Summary: image with name inside of form becomes property of form object → image named 'submit' inside of form shadows the method form.submit()
Target Milestone: --- → mozilla1.0.1
Assignee | ||
Comment 3•22 years ago
|
||
Attachment #85676 -
Attachment is obsolete: true
Assignee | ||
Comment 4•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Whiteboard: [HAVE FIX]
Assignee | ||
Comment 5•22 years ago
|
||
Attachment #85818 -
Attachment is obsolete: true
Comment 6•22 years ago
|
||
Comment on attachment 85821 [details] [diff] [review] Same for form.reset()... sr=vidur
Attachment #85821 -
Flags: superreview+
Comment 7•22 years ago
|
||
This testcase shows which "submit" is used. In IE 6, the input is used, not the method. And that seems right to me.
Assignee | ||
Updated•22 years ago
|
Attachment #85826 -
Attachment is patch: false
Attachment #85826 -
Attachment mime type: text/plain → text/html
Reporter | ||
Comment 8•22 years ago
|
||
Ok. I must have been on crack. jkeiser is right. nav4, IE6 and Mozilla agree that an input named submit or even a simple image named image in the form is exposed the same way as document.formname.submit. -> invalid
Reporter | ||
Comment 9•22 years ago
|
||
but why does IE6 submit the form on the ingdirect site?
Comment 10•22 years ago
|
||
In IE, you have this weird thing where form.submit can be an image or input while form.submit() calls the form's submit method. This behavior is a violation of the ECMA spec.
Reporter | ||
Comment 11•22 years ago
|
||
ok. god i hate IE. sorry for all the extra work. ->invalid.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Assignee | ||
Comment 12•22 years ago
|
||
I *believe* we could make mozilla work that way too, at least for form controls, but for images it would be hard (since we don't know what form they belong to). I can't say I want to do that tho, but if we really have to...
Comment 13•22 years ago
|
||
*** Bug 160692 has been marked as a duplicate of this bug. ***
Comment 14•22 years ago
|
||
*** Bug 160692 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•