• Post Reply Bookmark Topic Watch Topic
  • New Topic

Fill combo using properties file

 
Nikes Shah
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

Properties file
KEY VALUE
AA_TYPE_1 value1
AA_TYPE_2 value2
BB_TYPE_1 value3

Combo1
<option>AA</option>
<option>BB</option>

I have two comoboxes "combo1" and "combo2"
I am filling combo1 from database
I want fill combo2 using "onchange" event of combo1

My question is I want to fill combo2 values using properties file.
From above when I select AA from combo1 then combo2 should be filled up with "value1" and "value2" of keys AA_TYPE_1 and AA_TYPE_2

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A few points:
  • It's not a "combo box" -- HTML has no Combo Box control. Please read this for more information.
  • Reacting to the onchange event must be controlled via JavaScript, and use Ajax to request the contents of the second control.
  • On the server, the properties classes in the java.util package can be used to access the properties files.
  • That should be enough to get you started.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!