Dependent Menus

  • 1
  • Question
  • Updated 6 years ago
  • Answered
Not sure how to word this but I am creating a form and ran into a problem:

Is it possible to have a drop down menu (example: Fish, Chicken, Salad) and once you select one, a list dependent upon your previous choice is created (example: choose Fish, next drop down has Grilled, Baked, choose Chicken, next drop down has BBQ, Fried, choose Salad, next drop down has Garden, Caesar)?
Also, is it possible to have a list of check-able boxes dependent upon a drop down menu (example choose Fish, check-able boxes Mushroom, BBQ, Garlic or choose Chicken, check-able boxes Onions, Special Sauce, BBQ etc.)?

Sorry if this is confusing to some people, I will try to answer any questions you might have.

Thank you in advance.
Photo of Edward 'Jack' Nigma

Edward 'Jack' Nigma

  • 2 Posts
  • 0 Reply Likes
  • confused

Posted 6 years ago

  • 1
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
Hello Jack,

This may be what you are looking for: http://www.trans4mind.com/personal_de...
Photo of Edward 'Jack' Nigma

Edward 'Jack' Nigma

  • 2 Posts
  • 0 Reply Likes
This is exactly what I wanted! I will begin trying to figure out how to integrate this onto my site. Haven't looked at the page much but any other advice would be appreciated (unless the site is pretty straight forward) Thank you very much, and thank you for any future help.
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
Hello Jack,

This page is actually really helpful. You can see the three different blocks of options at the top of the page, with a seperate id for each i.e.
function MySubjectDMA(aMenu){

nullOptionsDMA(aMenu)

and
function MySubjectDMA1(aMenu){

nullOptionsDMA(aMenu)

and
function MySubjectDMA2(aMenu){

nullOptionsDMA(aMenu)


Then, about 3/4 of the way down, you see the following code:
if (menuSubjectsDMA.selectedIndex==1)


MySubjectDMA0(menuFilesDMA)

if (menuSubjectsDMA.selectedIndex==2)

MySubjectDMA1(menuFilesDMA)

if (menuSubjectsDMA.selectedIndex==3)

MySubjectDMA2(menuFilesDMA)

if (menuSubjectsDMA.selectedIndex==4)

MySubjectDMA3(menuFilesDMA)


This code associates the original menu with the options for the second menu.

Then all you need to do once you have edited the above is insert this code into a HTML Widget on your page:
<!-- ####################### copy the code below to where you want the menu to appear ####################### -->

<form name="formDoubleMenuDMA" >

<p><font size="2">Select a subject and then a page to go!</FONT>:<br>

<!-- This menu holds the subjects-->
<select name="menuSubjectsDMA" onChange="changeFilesDMA()">
<option value="none" >Select a subject</option>
<option value="">HTML</option>
<option value="">JavaScript</option>
<option value="">JavaScript 2</option>
<option value="">Style Sheet</option>
</select>
<!-- this menu holds the files to go-->
<select name="menuFilesDMA" onChange="goDMA(this)" style="width:300">
<option value="none"> Pages appear here

</select>

<p>
</form>


You can insert the rest of the code into another HTML Widget at the top of your page. (But only insert the code after <!-- ####################### start copying the HEAD code(DMA) here ####################### --> and before
<!-- ####################### copy the code below to where you want the menu to appear ####################### -->.

Hope you understand this, if not I will be able to help you further.

Kind Regards,

Andi