Page 1 of 1

Researching Functionality

Posted: Wed Jan 04, 2012 4:08 pm
by rick.emmet
Hi Everyone,
I'm creating a web application in PHP and need to do a little front end development. I need to research a particular type of functionality and don't know what it's called. It's probably Javascript and I have seen it used on a number of sites, however, when I look at the source code for the page I can't figure out what I'm looking at (I see the functions, but can't determine causality). If I can get the name of the functionality, I should have no problem finding tutorials on the subject.

What I'm looking for is similar in functionality to context menus with sub-menus. I can't have the submenus though, as the lists I will be using are too long and the users will have a difficult time scrolling through them. Sites such as AutoTrader.com have the type of functionality I'm looking for. If you select an auto “Make” from one pull down menu, the “Model” list in another pull down menu for that Maker is loaded. When the lists are long, this is a more user friendly approach. Can anyone tell me what the general term for this functionality is? Thanks a bunch!
Cheers,
Rick

Re: Researching Functionality

Posted: Wed Jan 04, 2012 4:18 pm
by pickle
The term you're looking for is "chained selects".

Basically how these work is a JS event is fired when the first select is change()ed. JS then either
a) makes an AJAX request to the server & populates the second select with what the server returns, or
b) already has the content in the page, and just updates the page with the necessary content

Re: Researching Functionality

Posted: Thu Jan 05, 2012 6:48 pm
by rick.emmet
Hello pickle,
Thank you for the quick reply! This looks like what I need (I think I prefer the "updating" method, I only have two lists). I just Googled AJAX and CHAINED SELECTS and have found several tutorials. Guess I have some reading to do. Thanks again!
Cheers,
Rick