Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to make dynamic combo box

 
Siddharth Sri
Greenhorn
Posts: 2
  • 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: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
  • 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: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic