Ken Ward's Java Script Tutorial ...

JavaScript Triple Menu

Triple drop down menu 5

 

To explore self development and computer stuff: - choose a topic from the drop-down box on the left, then a subject from the box in the middle. And finally choose a page from the drop down menu on the right.

Select a topic ... ... then a subject ... ... and then a page to go ...

The following function adds a list of files to the final menu depending on the subject chosen in the previous menu. Up until now, the files box has remained empty and if the user were to look at it he or she would find nothing there. We clearly cannot add these files until the user has selected a subject. And the subject box too remained empt until the user selected a topic.

The following code is very similar to that for MyTopics which was used to populate the subjects menu. The example function given below is one of several that are called depending on the users' selections.

 

/* ####################### start of files for main option 1 computer stuff

####################### */

function MySubject1(aMenu){

nullOptions(aMenu)

with (aMenu){

/* Rewrites the text and values */

options[0]=new Option("Select a page","none");

options[1]=new Option("How to do JavaScript","index.html");

/* items have been snipped */

options[77]=new Option("How to use hyperlinks in new windows","WindowNewHyperlinks.htm");

options[0].selected=true

}

//Netscape likes a refresh, but Microsoft doesn't

if (navigator.appName.indexOf("Netscape")>-1)

history.go(0)

}

 

Next: Triple Menu 6: simple go menu

Double drop down menu - click here! You can easily and quickly add a double drop down menu to your site. Click here to find out how.

 


Ken Ward's HTML Guide...

 

[If you need to learn more about HTML visit the HTML Tutorial]

I am always pleased to hear from you.
Send your comments to


And for some programming for your brain: check out New Life Course