I am using the following JavaScript to add a number of inputs based on a number in a drop down menu. It works fine in firefox and chrome, but in IE7 the inputs all float left on a new line.
function add(number)
{
var foo = document.getElementById("listInputs2");
var count = 1;
foo.innerHTML = "";
while ( count <= (number) )
{
//Create an input type dynamically.
var element = document.createElement("input");
//Assign different attributes to the element.
element.setAttribute("name", "value"+count);
element.setAttribute("id", "value"+count);
element.setAttribute("size", "60");
element.setAttribute("type", "text");
element.setAttribute("value", "");
//Append the element in page (in span).
foo.innerHTML+=('<li class="inputCount"><label for="value'+count+'">#'+count+'</label>');
foo.appendChild(element);
foo.innerHTML+=("</li>");
count += 1;
}
}