View Single Post
Old Mar 7th, 2006, 2:07 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Sure it is. I would advise against using document.write() though - it's on its way out. Use the innerHTML property of the element instead.

<script type="text/javascript">
function ShowTextBoxes (count)
{
    var textBoxes = document.getElementById("textboxes");
    
    var HTML = "";
    for (i = 0; i < count; i++)
    {
        HTML += '<input type="text" name="' + i + '" />\n';
    }
    
    textBoxes.innerHTML = HTML;
}
</script>

<div id="textboxes">
</div>
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote