Jump to content

Selection in one drop down box, makes another drop down box appear


INTJTech

Recommended Posts

I am creating a form that will allow the user to select the make of vehicle "FORD" for example. If that make of vehicle is selected among different makes of vehicles, then another box will appear, with all the models for that particular model "Fiesta" for example.

 

What type of code accomplishes this setup in my web page? I do not want to list 500 models in one drop down list, but just those for each make in the first drop down list.

 

Thanks much!

Link to comment
Share on other sites

It was said that you need AJAX. It's true, but there is another possibility.

 

You may load all your data into JS arrays (I think 2-dimentional array for models), in a time, when you create a page. Then you will select and show a part of this array (model), related to one exact type of the vehicle.

 

The benefit of this method is that you load all information just at once and don't warry about it later. In the same time, this is also a defect of this method :) - the total traffic will be higher for every user (in comparison with AJAX).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.