View Single Post
Old 05-15-2011, 12:34 AM   PM User | #8
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Try this
Code:
function addItemsToForm(){
    var txtBoxesO = document.getElementById('newTextBoxes').getElementsByTagName('input');
    for (var i=0, j=txtBoxesO.length; i < j;  i++){
        var newTxt = txtBoxesO[i].cloneNode(true);
        newTxt.id = '';                     // ids must be unique, so delete it
        newTxt.className = 'dispBlock';     // cloning loses the class name
        document.getElementById('addedItems').appendChild(newTxt);
    }
}
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote