Closed
Bug 61413
Opened 25 years ago
Closed 24 years ago
<input type=image name=foo> reflected as form.foo
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla0.9
People
(Reporter: sdm, Assigned: jst)
References
()
Details
(Keywords: dom0, Whiteboard: [HAVE PARTIAL FIX])
Attachments
(1 file)
|
20.87 KB,
text/html
|
Details |
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (Win95; U)
BuildID: 2000112015
This page uses a javascript function to submit the form:
<A HREF="javascript:document.yp.submit();">
The <form> tag has a name=yp attribute. I get a javascript error in the
javascript console:
Error: object is not a function
Source File:
Line: 0
The <A> tag contains an image submit button. This is the full line:
<A HREF="javascript:document.yp.submit();"><INPUT TYPE=IMAGE
src="/netfind/gr/yellowpages/search.gif" width="48" height="21" TABINDEX=6
NAME="submit" BORDER=0></A>
Commenting this out, and adding some text in the anchor fixes the problem. Using
an <img> instead of an <input type="image"> does not fix the problem. Other
browsers (nav4, ie5) handle this page fine.
Reproducible: Always
Steps to Reproduce:
1. Load the test case
2. Click the blue Search button
Actual Results: Nothing happens
Expected Results: The form should be submitted
| Reporter | ||
Comment 1•25 years ago
|
||
| Assignee | ||
Comment 2•25 years ago
|
||
I'm pretty sure this is a dupe of another of my bugs but I can't find it right
now...
| Assignee | ||
Comment 3•24 years ago
|
||
Hrmf, this is an interesting one, the general rule is that <input>s and other
form controls are reflected on the form element by the value of their name
attribute (i.e. as form.foo), however, for some reason <input type="image">
elements are not reflected on form elements by their name in neither NS4.x nor
IE. So, if we're gonna fix this we need to add code that special cases image
inputs, or we could not fix this and have AOL update the page.
Brendan, any idea what the reasoning behind <input type="image" name="foo"> not
being reflected on it's form as form.foo in NS4.x when all other input types are?
Status: NEW → ASSIGNED
OS: Windows ME → All
Hardware: PC → All
Comment 4•24 years ago
|
||
<input type="image" name="foo"> did not reflect as form.foo in the DOM level 0
code I wrote in 1995 because that particular input type was such a crack-baby.
In the old layout engine, the control flow to create such an element went
through the usual form element code, but upon seeing type="image", shunted off
into image code and resulted in an image element, not a form element, layout
data structure. I never had time to reconcile this special case with the normal
case where an input tag creates a form element struct, and no one else bothered
to fix it.
We should therefore not reflect such inputs as named items within their parent
forms. There isn't a better reason than compatibility here, but I think that's
a very good reason given five years of precedent.
/be
| Assignee | ||
Updated•24 years ago
|
Summary: can't submit the form on this page - get a javascript error → <input type=image name=foo> reflected as form.foo
| Assignee | ||
Updated•24 years ago
|
Whiteboard: [HAVE PARTIAL FIX]
| Assignee | ||
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9
| Assignee | ||
Comment 5•24 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•