Open
Bug 491012
Opened 16 years ago
Updated 3 years ago
When adding text fields using DHTML, everytime a new text field is added the value of the other dynamically added text fields is empty
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: robinsteeneken, Unassigned)
Details
Attachments
(1 file)
581 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)
Basically when I add a new text field using javascript, the value of all previously through javascript added text fields will be empty
Reproducible: Always
Steps to Reproduce:
1. Save provided html code into a file and open it with firefox.
2. Click the 'Click me' button, a new input type=text will be created
3. Enter a value in the new text input
4. Click the 'Click me' button again. A new input type=text will be created, but the value of the first dynhamically created text input will be empty
(5. You can repeat this over and over adding more text fields and every time a new field is added, all other dynamically added text fields will be emptied of their value)
Actual Results:
The value of all dynamically created text inputs is emptied when a new text field is added using javascript
Expected Results:
The value of all dynamically created text inputs should remain the same
Provided the following code for testing purposes:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
Ff error?
</title>
</head>
<body>
<div id="adder">
<script>
window.somecounter = 0;
</script>
<input type="text" name="rblgh" size="10" value="A" /><br />
</div>
<input type="button" onclick="document.getElementById('adder').innerHTML = document.getElementById('adder').innerHTML + '<input type=\'text\' name=\'somename[NEW][' + window.somecounter + ']\' /><br />';window.somecounter++;" value="Click me" />
</body>
</html>
Updated•16 years ago
|
Component: General → DOM: Core & HTML
Product: Firefox → Core
QA Contact: general → general
Comment 2•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•