Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AJAX help for javascipt novice...

Status
Not open for further replies.

admoore

IS-IT--Management
Joined
May 17, 2002
Messages
224
Location
US
First, apologies for such a general question...
I am much more fluent in PHP, MySQL, etc....

AJAX appears to be exactly what I need in this case, though, so here goes...

I need to dynamically alter a web page's form such that making a selection from a <select> pull-down menu results in the page offering a second (and ultimatly a third) pull-down menu based upon the selections above it.
Am I on track attempting this w/ AJAX? If so, could someone help me out, please, as I have found no examples specific to what I am attempting.

TIA-

-Allen
 
You could very well use Ajax to retrieve the data from another location but what you are looking to do with the select boxes is refered to as dynamic select or dynamic list boxes. There are a couple of FAQs for dynamically adding/removing items from a listbox.

I have done linked dynamic select boxes in the past and found it easiest to pull the data down into arrays when the page loads then use javascript to dynamically alter the content of each box based on the selection in the previous box. If you have a HUGE number of possible options then you might want to use Ajax to go out and retrieve new selections as needed but it might not be necessary.


Stamp out, eliminate and abolish redundancy!
 
Ajax is ideal for what you want to do, but as theniteowl says, it might be over engineering - i guess it depends on how much you want to learn about .net etc.

The is a FAQ for dynamically creating drop down lists.

Have a look:

faq216-4766
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top