Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to link one menu to another.

New Here ,
Dec 03, 2010 Dec 03, 2010

Hey guys,

I am creating a user input form for car types and car parts. I want to link one menu to another. I.e. the first menu will be make with a list of car makes, and if the user chooses "Ford" then the next menu will load items from a table "Ford" with the Ford models in it. I have the tables created in a database, one tabel is make with 50 different makes, and then i have 50 other tables for each make with the model types in it.

Sorry if this is confusing please ask me if you need any more info.

Thanks in advance

TOPICS
Server side applications
363
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 03, 2010 Dec 03, 2010

Just answered the same question in a different post

Search the web for 'dependent dropdown' or 'cascading dropdown' for plenty of tips and techniques.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 03, 2010 Dec 03, 2010
LATEST

supersham101 wrote:

I want to link one menu to another. I.e. the first menu will be make with a list of car makes, and if the user chooses "Ford" then the next menu will load items from a table "Ford" with the Ford models in it.

What you are looking for is a dependent drop-down menu. To get the values for the second menu, you need to send another request to the server, either by submitting the form again, or by using an Ajax request to populate the dependent drop-down. I don't know of any online tutorials for doing this, but you should be able to find something by doing a Google search. I know that "jQuery in Action, Second Edition" by Bear Bibeault and Yehuda Katz (published by Manning) describes in considerable detail how to do this.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines