CreateElement input text values lost if use innerHTML

RESOLVED DUPLICATE of bug 159282

Status

()

--
major
RESOLVED DUPLICATE of bug 159282
11 years ago
11 years ago

People

(Reporter: mehmetkuruyuz, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

So, I create elements on web page, If i use innerHTML, i lost my ex inputs text values.

Reproducible: Always

Steps to Reproduce:
1.I create input text some layer
2.I use innerHTML before create
3.Another created elements values has been lost.

Actual Results:  
every values lost

Expected Results:  
In ie(6) has no problem this action. 

I give my code:

function newElement()
{
var id;
uq=new Date;
id=uq.getTime();
document.getElementById("divid").innerHTML+="<br/>Some Text:";
var newtext = document.createElement('input'); 
newtext.setAttribute("id","vote"+id); 
newtext.setAttribute("name",'vote-'+id); 
newtext.setAttribute("value",'');
newtext.setAttribute("type",'text');	
document.getElementById("divid").appendChild(newtext); 
}

Updated

11 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 159282
(Assignee)

Updated

11 years ago
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.