Forum Moderators: open
<select name="make" id="make" onChange="someAction();">
"someAction" would either load the second list via Javascript or submit it to the server and your script would provide both lists. Keep in mind this has to happen if you switch makes.
This is Javascript driven, which is okay, but if Javascript is disabled it won't work. The alternative would be to initially display a "next" button beside the select, and if Javascript is enabled, use it to "hide" the button. Then the onChange would work.
You could also do this with Ajax, which is Javascript on steroids, which loads portions of the page without refreshing the entire page.
The other is to dispense with Javascript entirely, and use a "next" or "show models" button next to the select as described above. This would be most reliable, but less convenient for the user.
In either case, the server-side logic would be the same:
if ($model) {
if (! $make) { display_select_make_page; }
else { display_makes_and_models; }
}
else { display_select_model_page; }