This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes dynamically populating dropdown menu with ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "dynamically populating dropdown menu with ajax" Watch "dynamically populating dropdown menu with ajax" New topic

dynamically populating dropdown menu with ajax

sony rao

Joined: Jun 18, 2007
Posts: 20

iam supposed to populate a drop down menu based on the value selected in another drop down menu using ajax. i have to use jsp, servlet(for retrieving values from database). can anybody please share links, tutorials or code regarding this. (no php)
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63053

This is probably one of the most classic of Ajax use cases and there are tons for examples all over the web. Do a search for "dependent dropdowns" or "cascading dropdowns" and you should find a lot of examples.

P.S. Properly written, any Ajax code to do this (or anything else for that matter) should be completely independent of what's being used on the server (php vs. JSP, for example).
[ August 28, 2007: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
subject: dynamically populating dropdown menu with ajax
It's not a secret anymore!