PDA

View Full Version : double menu for forms?



wright67uk
18 Apr 2011, 12:05 AM
ello, im trying to create 2 menus,

The 1st as below, and the 2nd with values based on that selected in menu 1
eg.


<body>

Menu 1

<select>
<option>Restaurants</option>
<option>Takeaways</option>
<option>Hotels</option>
<option>Pubs</option>
</select>

Menu 2

If restaurant selected then display the following options;

<select>
<option>Chinese</option>
<option>Indian</option>
<option>Thai</option>
<option>Italian</option>
</select>

If takeaways selected then display the following options;

<select>
<option>Pizza</option>
<option>Mexican</option>
<option>Burgers</option>
<option>Kebabs</option>
</select>

</body>

what is the best way of doing this?
Will I have to look into javascript etc.?

Wickham
18 Apr 2011, 12:47 AM
You can use chained select boxes as in this tutorial (needs javascript/ActiveX):-
http://www.dynamicdrive.com/dynamicindex16/chainedselects/index.htm