• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Populate values in drop down

 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have two dropdown box in a page. Now based on what i select in the first drop down box, the values for the second box have to be populated based on what i select in the first box. Can anyone tell me how to achieve this.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65126
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search for Ajax examples to do this. It's the most common example available.
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Could you please give me the URL where i can find any sample tutorials. Which is better to follow? AJAX for javascript for implemeting this functionality?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
google it,you will get lot of url. and i want to give some code for this

index.jsp
-----------------


and my ajax.jsp
-----------------------



Here scriptlets in jsp....please this is deprecated, i want to give a some sample...thats why i paste this...

Hope from this you can understand
 
Manuel Leiria
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out AjaxTags
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using this to bring the values in the drop down. In this example, all the values for the array is been given in the code itself. Instead i want is to read it from the property file and then assign those values to the array.
Can you tell me how can i do this? Also where should i write the code? inside the <script> tag or inside the <body> tag. Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic