0

What I am trying to do is very similar to this question:
Using jQuery to dynamically add form fields (or fieldsets) based on a dropdown box value

Specifically, I want to use a drop down box value to add that number of input boxes to a fieldset.

I do not know jQuery so the answer I am linking to hasn't answered my question, I would like to know how to do this in JavaScript?

Community
  • 1
  • 1
Atomix
  • 2,440
  • 8
  • 36
  • 48

1 Answers1

1

There are lots of instructions on how to use JQuery. I suggest that you go to http://docs.jquery.com to learn it rather than looking here for a specific answer to your question. Spending the time to figure it out for yourself will be far more useful than a copy-paste answer.

You'll follow some basic steps. Tackle each one individually.

  • Read the value from the drop-down when it changes.
  • Find the element to contain the new input boxes.
  • Loop through the number of values
  • Insert the appropriate HTML for each loop iteration.
John Fisher
  • 22,355
  • 2
  • 39
  • 64