This week's book giveaways are in the Angular and TypeScript and Web Services forums.
We're giving away four copies each of Programming with Types and The Design of Web APIs and have the authors on-line!
See this thread and this one for details.
Win a copy of Programming with Types this week in the Angular and TypeScript forum
or The Design of Web APIs in the Web Services 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

Dynamic Drop Down List

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I designing a form that has several drop down lists. When you select an item on a drop down list, the contents of another has to be dynamically generated with an sql statement where the value of the first drop down list is part of the where clause.
Some IDE's have this build in, but i'm just using a vi editor.
Any advice, sample code, links ?
Thanks in advance.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can dynamically change other combo values by writing a onchange() event in the first combo.in onchange event you can catch the combo value and get the corresponding other combo values from database dynamically and can be displayed in other combo's.......
 
Armand Aquino
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vinay, can you give me some sample code ? Like what exactly will the javascript function do on the onChange?
Thanks in advance
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone who has the code yet? it's hard to find over the net i always get php code...
 
Marshal
Posts: 67336
171
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this.
 
Bear Bibeault
Marshal
Posts: 67336
171
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by doms molina:
anyone who has the code yet? it's hard to find over the net i always get php code...



The server-side code for this is trivial: simply obtain the data by whatever means and return it as XML or JSON. It's the client-side Ajax code that can be tricky (unless you are using an Ajax-enabled library such as jQuery -- highly recommended).
 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using Struts , then its better to use Ajax Anywhere.Its very easy to use.

Regards,
Bhagavan
[ December 11, 2008: Message edited by: rajanikanth bhagavan kanth ]
 
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!