This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to make dynamic combo box

 
Siddharth Sri
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a database in which aerial no an a name corresponding to that serial no is stored.
Now I have a combo box (HTML + JSP) listing the serial no.
How can I make the page to show the corresponding name just after the number is selected in the combo box(without using submit button).

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no such thing as a "combo box" in HTML. Please read this for more information.

Perhaps you meant a select element?

If so, assign a change handler to the element, and then use Ajax to fetch an HTML fragment from the server to show on the page.
 
Siddharth Sri
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:There is no such thing as a "combo box" in HTML. Please read this for more information.

Perhaps you meant a select element?

If so, assign a change handler to the element, and then use Ajax to fetch an HTML fragment from the server to show on the page.


yes I meant select element. Can you tell how to use change handler ? Then I can move ahead with it.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look up JavaScript event handling. You will find examples of establishing event handlers. Be aware that there are vast browser differences between browsers that follow the standards, and IE, which does not.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic