This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic Drop Down List  RSS feed

 
Armand Aquino
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.
 
vinay bedidha
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
 
John Kramer
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...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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).
 
rajanikanth bhagavan kanth
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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!