• 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

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: 67451
173
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: 67451
173
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 ]
 
Attractive, successful people love this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic