aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes how to make dynamic combo box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to make dynamic combo box" Watch "how to make dynamic combo box" New topic
Author

how to make dynamic combo box

Siddharth Sri
Greenhorn

Joined: Jul 16, 2009
Posts: 2
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

Joined: Jan 10, 2002
Posts: 60057
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Siddharth Sri
Greenhorn

Joined: Jul 16, 2009
Posts: 2
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

Joined: Jan 10, 2002
Posts: 60057
    
  65

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to make dynamic combo box
 
Similar Threads
Combobox Script Required
run time control change
populate the select when page is displayed first time
difference between ItemStateChanged and ActionPerformed
Dependent Drop-down Combo boxes