Closed Bug 127847 Opened 23 years ago Closed 23 years ago

[FIX]<object>'s not included in form.elements

Categories

(Core :: Layout: Form Controls, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.2alpha

People

(Reporter: andrea.aime, Assigned: bzbarsky)

References

()

Details

Attachments

(2 files, 1 obsolete file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.8+) Gecko/20020220 BuildID: 2002022003 www.trenitalia.it provides a traintable search engine. The query form is provided with default values (current date and hour), but unfortunately the field placement is wrong if you choose italian language, values are not placed in their destination field, but in the next one Reproducible: Always Steps to Reproduce: 1. www.trenitalia.it 2. enter the english version of the site, form is properly initialized 3. go back 4. enter the italian version of the site 5. the fields are not initialized properly Actual Results: ... had to fill the form fields by hand Expected Results: to work in Italian as it does in English, French, Espagnol,... (works in every other language, and works as expected in IE)
->html form controls
Assignee: trudelle → rods
Component: XP Apps → HTML Form Controls
QA Contact: sairuh → madhur
The site seems to be one single flash thing. I see no way to navigate it and see no content (but I have no flash).
Happens w/ Build: 2002022503 OS: WinME
Status: UNCONFIRMED → NEW
Ever confirmed: true
-->
Assignee: rods → jkeiser
I have the same problem as Boris. Can someone provide a link to the portion of the site with the referenced input fields?
QA Contact: madhur → tpreston
This may be an Evangelism issue; see bug 138767
*** Bug 138767 has been marked as a duplicate of this bug. ***
Jst, the problem here is that IE counts any <object> that comes inside a form in form.elements. Neither Mozilla nor NS4 does so.... Should we attempt to do that (a major PITA, if I remember how this stuff works)? Or call this broken behavior on the part of IE and evangelize the site?
OS: Windows NT → All
Hardware: PC → All
To muddy the waters further, there is a spec that says the OBJECTs should be able to submit their values. In that case it makes *sense* to make OBJECTs submit.
*** Bug 139206 has been marked as a duplicate of this bug. ***
Summary: <object> elements are not included in the form.elements HTMLCollection. This is backwards-compatible with NS4 but not with IE. According to jkeiser, there is "a" spec that says <object> should be able to submit their values, however. Thoughts?
Summary: Default form values incorrect (but only when using italian language) → <object>'s not included in form.elements
The DOM spec also defines a form property on object elements (see nsIDOMHTMLObjectElement) so that seems to indicate that objects are indeed parts of a form if they're associated with a form. IMO we should follow IE here, NS4x didn't support object tags at all, so we can't really rely on what it did here. This shouldn't really be that hard to fix, we'll just need to add the form fluff to nsHTMLObjectElement and places where form controls are treated specially (i.e. the html sink).
*** Bug 155084 has been marked as a duplicate of this bug. ***
*** Bug 160491 has been marked as a duplicate of this bug. ***
Helpful comments by Marcus from the duplicate bug 160491: ------- Additional Comment_ #1 From Marcus Campbell 2002-08-01 06:57 ------- IE counts OBJECTs as FORM control elements but Mozilla doesn't. As a result of this, the values being assigned to the INPUTs via document.forms[0].elements[?].value are being assigned differently. I don't know enough about the DOM to tell for certain, but under DOM Level 1 [1] it seems that IE is right. Under Level 2 [2] it seems Mozilla is right. [1] http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-9893177 [2] http://www.w3.org/TR/2001/WD-DOM-Level-2-HTML-20011025/html.html#ID-9893177
IE is in fact right, period. We are wrong. The DOM2 HTML candidate rec has an error (and this error will be fixed now that you have pointed it out; thank you). Nominating this. This is going to come up more and more, I think, and should not be so hard to fix.
Keywords: nsbeta1
Attached patch This should fix it (obsolete) — Splinter Review
Comment on attachment 93638 [details] [diff] [review] This should fix it Need to rename formControl to isFormControl now that it's a bool. Pity our plugin interface doesn't support name/value submission. r=jkeiser
Attachment #93638 - Flags: review+
Attachment #93638 - Attachment is obsolete: true
taking
Assignee: jkeiser → bzbarsky
Priority: -- → P1
Summary: <object>'s not included in form.elements → [FIX]<object>'s not included in form.elements
Target Milestone: --- → mozilla1.1alpha
Comment on attachment 93653 [details] [diff] [review] Patch with isFormControl rolling r=jkeiser
Attachment #93653 - Flags: review+
I think 1.2alpha is more appropriate milestone.
Status: NEW → ASSIGNED
Keywords: nsbeta1nsbeta1+
Target Milestone: mozilla1.1alpha → mozilla1.2alpha
Comment on attachment 93653 [details] [diff] [review] Patch with isFormControl Not directly related to this patch, but it looks like NS_FORM_NOTSET is defined in nsIFormControl but it's never used, so do you mind removing that while you're at it? And NS_FORM_NOTOK is defined too, but isn't used for anything useful, so that could be removed and the users replaced with NS_ERROR_FAILURE or somesuch. If you want to file a new bug for this that's ok too. Hmm, I wonder why nsGenericHTML*FormElement's destructor doesn't do the SetForm(nsnull) for us? Seems silly to have to sprincle those calls in all classes that inherit... sr=jst
Attachment #93653 - Flags: superreview+
New bug 161243 filed on those other issues. This patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
*** Bug 165498 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.

Attachment

General

Created:
Updated:
Size: