• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Fill combo using properties file

 
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.
 
Marshal
Posts: 67447
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
     
    You can't have everything. Where would you put it?
    Thread Boost feature
    https://coderanch.com/t/674455/Thread-Boost-feature
      Bookmark Topic Watch Topic
    • New Topic