The moose likes HTML, CSS and JavaScript and the fly likes Populating the Combo Box using AJAX Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Populating the Combo Box using AJAX" Watch "Populating the Combo Box using AJAX" New topic

Populating the Combo Box using AJAX

Aravind Prasad
Ranch Hand

Joined: Dec 28, 2005
Posts: 265
Dear Ranchers,
I'm doing my project in JSP and MySQL. The project is a lead-time calculation part. In the page I designed, I've 5 combo boxes.

Combo 1 : List all the countries
Combo 2 : List the Ports in the country which i selected after reloading
Combo 3 : List the Destination Place from the Lead time after reloading
Combo 4 : List the details type of transportaion (AIR, SEA or Road)

Textbox : will display the lead time of the shipments coming in mode of transport where country = xxx and port = xxx and destination = xxx

When ever i change the combo box values, I've written a script in onChange() to submit to the same page and it is taking long time for the user, since it is uploaded in the remote server.

I would like to use this in AJAX. I want some sample code for doing this.

Please help me ranchers..

Thanks and Regards

Aravind Prasad
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63331

There are examples of doing this all over the web. What part has you stumped?

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Populating the Combo Box using AJAX
jQuery in Action, 3rd edition