I currently have a page that dynamically adds text boxes using innerHTML when required. All fine in ie but with firefox when a new box is added it clears any text you may have written in the previous box.
This suggests to me that firefox is adding the innerHTML to the original source code and not the current document code. Does anyone know how I can get firefox work with the actual content.
Here is a simple version of the code if you need it
Javascript:
HTML
So, when I add a box it appears ok. If I type something in the text box then add another the first one gets cleared. This only happens in Firefox.
This suggests to me that firefox is adding the innerHTML to the original source code and not the current document code. Does anyone know how I can get firefox work with the actual content.
Here is a simple version of the code if you need it
Javascript:
Code:
function addBox() {
strBox = '<input type="text" value="">'
document.getElementById('imgBoxes').innerHTML+=strBox
}
HTML
Code:
<div id="imgBoxes">
</div>
So, when I add a box it appears ok. If I type something in the text box then add another the first one gets cleared. This only happens in Firefox.