Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Please tell me

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have 2 combo box out of which first is filled with data from a field from DB and the second should be populated on the basis of the selection of the first.
Could you please help me how to achieve this
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well you either have to submit your form back to the server or use Ajax.

It is normally called a "Double Combo" or "LInked Selects" and it has been discussed many times in this forum.

Eric
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I suggest doing something similar to this:

https://coderanch.com/t/122763/HTML-JavaScript/Select-element

All we need to display some option is to get the corresponding ID and set selected as true on that.

Thanks,
Sandip
 
Sheriff
Posts: 67699
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Amisha Sharma:
I have 2 combo box ...


No, you don't. There is no such thing as a "combo box" in HTML. Please read this for more information.
 
Bear Bibeault
Sheriff
Posts: 67699
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

Using a title of "Please tell me" isn't very helpful.

Please go back and change your post to add a more meaningful subject by clicking the .
 
Hoo hoo hoo! Looks like we got a live one! Here, wave this tiny ad at it:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic