• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Auto Populate Combo Box upon Radio Selection

 
Nitin Sinha
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have four radio options and one combo box in my form.

Radio Option 1
Radio Option 10
Radio Option 20
Radio Option 30

What I want is that if i select Radio Option 1, then the combox box should get populated with values 1 through 9. Similarly if i select Radio Option 20, the combo box populates with values 10 through 19 and so on.

How can i achieve this in HTML using Javascript ? Please assist me with the code.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remove options from a select


Add An Option


Read a value



Hopefully you can figure out how to use onchange and a for loop to make it work.

Eric
 
Nitin Sinha
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is kind of tough to understand this way.. Can you give me some link of working example to explain the same
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65123
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTML has no Combo Box control; please use proper terminology. Please read this for more information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic