nisim777
07-08-2009, 02:31 PM
I cannot figure out how to repeat a section of html code using javascript. I am thinking that it can be done by repeating with the div id, but I'm not sure how to figure it out.
I'm building a function that gets a number from the users via a drop down list. Based on the user response, I need a section of a form to repeat and in the element names, I need it to increment the names (e.g., <input type='text' name='glassType1' /> where the '1' is a incrementing number for each repetition of the section of code).
So, to make it more clear.
The user selects the number of pieces they want on a window unit. Based on their selection, the piece options section repeats that many times and increments the form element names in that section so that each piece in the window can have it's own separate set of options.
Thanks, I know I'm asking a lot. This is a small project I'm working on for my mother-in-law, and it is something she requested if I could do it. I'd like to try to get it working for her.
I'm building a function that gets a number from the users via a drop down list. Based on the user response, I need a section of a form to repeat and in the element names, I need it to increment the names (e.g., <input type='text' name='glassType1' /> where the '1' is a incrementing number for each repetition of the section of code).
So, to make it more clear.
The user selects the number of pieces they want on a window unit. Based on their selection, the piece options section repeats that many times and increments the form element names in that section so that each piece in the window can have it's own separate set of options.
Thanks, I know I'm asking a lot. This is a small project I'm working on for my mother-in-law, and it is something she requested if I could do it. I'd like to try to get it working for her.