|
Re: Form images don't appear in form.elements: msg#00040mozilla.devel.dom
Howard Jess wrote: > Apparently, form elements of type > > <input type="image" src="...> > > are not included in the form's elements[] collection. > > I don't understand why not; according to DOM2, all form > control elements in the form are part of the elements > collection. They don't always not appear in the elements collection, but it would be reasonable to say that it would not be a good idea to expect to be able to find them there (as they commonly will not be present). > Further, this element doesn't appear in the (DOM0) > document.images collection either; It would be unexpected for them to appear in - document.images - as it is explicitly a collection of IMG elements, no elements that happen to be displaying images (such as maybe OBJECT). > so it's really not well-accounted for. It is certainly a unhelpful peculiarity where forms are concerned. <snip> > Is there an explanation for this, or was this behavior > chosen strictly to mimic Internet Explorer's behavior? > Or, am I doing something wrong? <snip> I think you will find that this behaviour originates with a Netscape browsers. Netscape 4 had no means of referencing these elements (as they did not even support event handlers), and that may have also been true for earlier versions (thus pre-dating scriptable IE versions). Richard. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Form images don't appear in form.elements: 00040, Howard Jess |
|---|---|
| Next by Date: | GetComputedStyle returning "auto": 00040, Xiaolei Li |
| Previous by Thread: | Form images don't appear in form.elementsi: 00040, Howard Jess |
| Next by Thread: | GetComputedStyle returning "auto": 00040, Xiaolei Li |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |