Closed
Bug 50418
Opened 25 years ago
Closed 23 years ago
textfield/textarea value attribute doesn't work before appendChild()
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: taras.tielkes, Assigned: jst)
References
Details
(Keywords: dom1, testcase, Whiteboard: [nsbeta3-])
Attachments
(2 files)
Programmaticaly creating a textfield and modifying the "value" property seems
to have no effect.
PDT: this is very basic DOM0/DOM1 code.
Reporter | ||
Comment 1•25 years ago
|
||
Reporter | ||
Updated•25 years ago
|
Reporter | ||
Comment 2•25 years ago
|
||
With a 24 aug nightly build, the textfield remains empty. Expected bahviour: the
textfield gets the value assigned to it. This is wat happens when you run the
textcase in IE5 on Windows.
Reporter | ||
Comment 3•25 years ago
|
||
Also seen on Aug 25 nightly build on Linux, changing to All/All
OS: Windows NT → All
Hardware: PC → All
Reporter | ||
Comment 4•25 years ago
|
||
It seems "value" of textfields (and perhaps more form elements) only works when
the form control is already connected to the DOM. (that is, inserted, appended,
et cetera).
Comment 5•24 years ago
|
||
Marking nsbeta3- and futuring.
Whiteboard: [nsbeta3-]
Target Milestone: --- → Future
ay, this is a show stopper for me, fix it asap pretty please! i'll hook you up
with some hot scandinavian blondes.
./t
Reporter | ||
Comment 7•24 years ago
|
||
A lot of HTML objects had similar errors back in the M15 days. I'll check some
more HTML form controls and see if they have this issue.
Reporter | ||
Comment 8•24 years ago
|
||
At the moment, the "value" property of a HTML form control will only be visible
when the "value" assignment takes place *after* attaching to the document.
(Using appendNode() or a similar method).
Setting the "defaultValue" property, and after that attaching the textfield to
the document will render the textfield with the "defaultValue" as contents.
I think that the first should work, and the second should display a empty
textfield that will only get the "defaultValue" when you RESET the form.(This
is the behaviour of IE5, and as-far-as-I-see what the spec says.) CC'ing Vidur
to comment on this. Vidur, the IE5 behaviour is in accordance with what you
wrote in the dom news group.(6/22/2000, "DOM and text INPUT" thread.)
Reporter | ||
Comment 9•24 years ago
|
||
Reporter | ||
Updated•24 years ago
|
Summary: Textfield.value is doesn't work → textfield/textarea value attribute doesn't work before appendChild()
Reporter | ||
Comment 10•24 years ago
|
||
Argh! The current mozilla and IE5 implementations of this are 180 degrees apart.
(Check the 2nd testcase in both browsers).
The questions I have are:
1) Is it OK to use the "value" attribute *before* the element is part of a
document?
2) If I set the "defaultValue" before doing appendNode(), should the control
show up with that value when I insert in into the document? (I think yes, but
IE5 ignores this)
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Comment 12•24 years ago
|
||
This does still not work on the latests Mozilla builds or on PR3. Its a big
showstopper for me...any chance it will be fixed?
Comment 13•24 years ago
|
||
![]() |
||
Comment 14•24 years ago
|
||
See also comments in bug 57269, some of which could be relevant...
Updated•24 years ago
|
Component: DOM Level 1 → DOM Core
this one is fixed with the fix for bug 17003.
thomas@pdb.no: where/how can I get those Scandinavian blonds? I live in
Stockholm so it would be great if you could get hold of any in this
neighborhood. But traveling to Norway is totally ok. See also my comments in
bug 95849.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•