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!

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).

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.