Closed Bug 58089 Opened 25 years ago Closed 24 years ago

createElement on form objects (input, textarea, etc) not working correctly..?

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

VERIFIED WORKSFORME
mozilla0.9.9

People

(Reporter: post, Assigned: jst)

Details

(Keywords: dom1, Whiteboard: [HAVE FIX])

Attachments

(2 files)

using build id: 2000100820 on WinNT 4.0 using createElement to dynamically create form elements is not working correctly. The form element will be added, but the value poperty will be blank. examples: <html> <head> <title>Untitled</title> </head> <body> <form name="mainFrm" method="post" action=""> </form> </body> </html> <script> frm=document.mainFrm; var newTxtArea=document.createElement("TEXTAREA"); newTxtArea.name="test1"; newTxtArea.value="This is a test. will it work?"; frm.appendChild(newTxtArea); var newTxtArea2=document.createElement("TEXTAREA"); newTxtArea2.setAttribute("name","test1"); newTxtArea2.setAttribute("value","This is a test. will it work?"); frm.appendChild(newTxtArea2); var newTxt=document.createElement("INPUT"); newTxt.type="TEXT"; newTxt.value="hi"; frm.appendChild(newTxt); var newTxt=document.createElement("INPUT"); newTxt.type="TEXT"; newTxt.value="hi"; frm.appendChild(newTxt); </script>
It also works for me in build id: 2000110304, Mozilla dosen't fill the boxes with default text.
Adding harish to the Cc: since he knows about the parser side of this problem...
Status: UNCONFIRMED → ASSIGNED
Component: DOM Level 2 → DOM Level 1
Ever confirmed: true
OS: Windows NT → All
QA Contact: vidur → desale
Hardware: PC → All
Target Milestone: --- → mozilla0.9
brain says bug 27327. Any thought?
Nope, 27327 is different. I'll attach a fix for this one.
Attached patch Proposed fixSplinter Review
pollmann sez r=pollmann
Whiteboard: [HAVE FIX]
Target Milestone: mozilla0.9 → mozilla0.9.1
Keywords: dom1
trying to clean up the 0.9.1 let's do this for 0.9.2.
Target Milestone: mozilla0.9.1 → ---
Component: DOM Other → DOM HTML
Target Milestone: --- → mozilla0.9.2
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala
Moving to mozilla0.9.3
Target Milestone: mozilla0.9.2 → mozilla0.9.3
I hope I am not speaking out of turn here. You can get this testcase to work if you move the appendChild immediately after the createElement. I am hoping this is fixed, but there is a somewhat viable work around.
in which case it's really a dup of bug 50418. jst is this fix still apply-able and if yes, do you still need review? Does it also fix bug 50418?
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Pushing to mozilla0.9.5
Target Milestone: mozilla0.9.4 → mozilla0.9.5
This is related to, but not a dup of bug 50418.
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Pushing to mozilla0.9.7
Target Milestone: mozilla0.9.6 → mozilla0.9.7
should setting the "value" attribute really set a textareas value? afaict textareas don't have a value attribute at all? setting .value should work though
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Target Milestone: mozilla0.9.8 → mozilla0.9.9
jkeiser, did you fix this one as part of all the changes?
WORKSFORME.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Yes, this was fixed with bug 34297. Radio buttons should still exhibit this problem, that is bug 108308. This is as a result of form control values not being initialized until their frames are created.
verified worksforme
Status: RESOLVED → VERIFIED
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: