Create Copies Of Divs Using Dropdown Menu

I need to create copies of divs depending on a drop down menu. This page was helpful but I need to take it one step further: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_20795001.html?sfQueryTermInfo=1+10+30+copi+div+entir

Lets say I have a dropdown menu with an id of ’employeeNumber’ and with options/values of 1-10. Also, I have a couple divs, one called ‘form4019’ and another called ‘form200x’.

The numbers in the drop down correspond with the number of copies of need of each div. If user selected the number 2 in the drop down, I want two copies of each div created. If they select 5, I want 5 copies of the div created, using the following id convention: ‘form4019b, form4019c form4019d, etc.. or form200xb, form200xc, etc…

I also need to be able to control where the divs are copied in the page. I would like then to go to a spot in my code, one following the other.

Leave a Reply

Your email address will not be published. Required fields are marked *