<!-- ONE STEP TO INSTALL PULLDOWN MENU (DOUBLE): 1. Add this code into the BODY of your HTML document --> <!-- STEP ONE: Copy this code into the BODY of your HTML document --> <BODY> <BR><CENTER> <TT>Quick Navigation: <CENTER> <P> <SCRIPT LANGUAGE = "JavaScript"> <!-- This script and many more are available online from --> <!-- The JavaScript Source!! http://javascriptsource.com --> <!-- Begin function makeItem(name, url) { this.name = name; this.url = url;} function newItem(name, url) { itemsIndex++; cats[catsIndex][itemsIndex] = new makeItem(name, url); cats[catsIndex].length++;} function makeCat(name) { this.name = name; this.length = 0;} function newCat(name) { catsIndex++ itemsIndex = -1; cats[catsIndex] = new makeCat(name);} function relateItems(cat) { if (isNS3) { if (cat > 0) { catsIndex = cat - 1; with (document.m.m2) { for (var i = options.length; i > 1; i--) options[i] = null; for (var i = 0; i < cats[catsIndex].length; i++) options[i + 1] = new Option(cats[catsIndex][i].name); options[0].selected = true; } } } else { if (m1.listIndex > 0) { m2.clear(); m2.addItem(itemHeading); catsIndex = m1.listIndex - 1; for (var i = 0; i < cats[catsIndex].length; i++) m2.addItem(cats[catsIndex][i].name); m2.listIndex = 0; } } itemsIndex = 0; } function gotoPage(item) { var url = null; if (isNS3 && item > 0) url = cats[catsIndex][item - 1].url; if (isIE && m2.listIndex > 0) url = cats[catsIndex][m2.listIndex - 1].url; if (url != null) window.location.href = url; } function addHeadings() { m1.addItem(catHeading); for (var i = 0; i < cats.length; i++) m1.addItem(cats[i].name); m1.listIndex = 0; m2.addItem(itemHeading); m2.listIndex = 0; } var isNS3 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 3); var isIE = (navigator.appName == "Microsoft Internet Explorer"); var cats = new Array(); var catsIndex = -1; var itemsIndex = -1; var catHeading = 'Choose A Category'; var itemHeading = 'Choose A Page'; var betweenHeading = ' then '; newCat('*Main*'); newItem('Home Page', 'http://javascriptsource.com'); newItem('Discussion Forum', 'http://bbs.javascriptsource.com'); newItem('Visitor Survey', 'http://javascriptsource.com/survey.html'); newItem('Request a Script', 'http://request.javascriptsource.com'); newItem('Contribute a Script', 'http://contribution.javascriptsource.com'); newItem('Get JavaScript Help', 'http://help.javascriptsource.com'); newCat('Background Effects'); newItem('** Category Page **', 'http://bgeffects.javascriptsource.com'); newCat('Buttons'); newItem('** Category Page **', 'http://buttons.javascriptsource.com'); newCat('Calculators'); newItem('** Category Page **', 'http://calculators.javascriptsource.com'); newCat('Clocks'); newItem('** Category Page **', 'http://clocks.javascriptsource.com'); newCat('Cookies'); newItem('** Category Page **', 'http://cookies.javascriptsource.com'); newCat('Equivalents'); newItem('** Category Page **', 'http://equivalents.javascriptsource.com'); newCat('Forms'); newItem('** Category Page **', 'http://forms.javascriptsource.com') newCat('Games'); newItem('** Category Page **', 'http://games.javascriptsource.com') newCat('Links'); newItem('** Category Page **', 'http://links.javascriptsource.com') newCat('Messages'); newItem('** Category Page **', 'http://messages.javascriptsource.com') newCat('Navigation'); newItem('** Category Page **', 'http://navigation.javascriptsource.com') newCat('Page Details'); newItem('** Category Page **', 'http://page-details.javascriptsource.com'); newCat('Password Protection'); newItem('** Category Page **', 'http://passwords.javascriptsource.com'); newCat('Scrolls'); newItem('** Category Page **', 'http://scrolls.javascriptsource.com'); newCat('User Details'); newItem('** Category Page **', 'http://user-details.javascriptsource.com'); // End --> </SCRIPT> <SCRIPT LANGUAGE = "VBScript"> Sub m1_Change() call relateItems End Sub Sub m2_Change() call gotoPage End Sub Sub Window_onLoad() call addHeadings End Sub </SCRIPT> <SCRIPT LANGUAGE = "JavaScript"> <!-- This script and many more are available online from --> <!-- The JavaScript Source!! http://javascriptsource.com --> <!-- Begin if (isNS3) { document.write('<FORM NAME = "m">'); document.write('<SELECT NAME = "m1" '); document.write('onChange = "relateItems(this.selectedIndex)">'); document.write('<OPTION>' + catHeading + '</OPTION>'); for (var i = 0; i < cats.length; i++) { document.write('<OPTION>' + cats[i].name + '</OPTION>'); } document.write('</SELECT>' + betweenHeading); document.write('<SELECT NAME = "m2" '); document.write('onChange = "gotoPage(this.selectedIndex)">'); document.write('<OPTION>' + itemHeading + '</OPTION>'); for (var i = 0; i < 10; i++) document.write('<OPTION></OPTION>'); document.write('</SELECT></FORM>'); for (var i = document.m.m2.options.length; i > 0; i--) document.m.m2.options[i] = null; } else if (isIE) { document.write('<OBJECT ID = "m1" WIDTH = "221" '); document.write('HEIGHT = "24" CLASSID = '); document.write('"CLSID:8BD21D30-EC42-11CE-9E0D-00AA006002F3">'); document.write('<PARAM NAME = "VariousPropertyBits" VALUE = "746604571">'); document.write('<PARAM NAME = "Size" VALUE = "5574;635">'); document.write('<PARAM NAME = "MatchEntry" VALUE = "1">'); document.write('<PARAM NAME = "FontCharSet" VALUE = "0">'); document.write('<PARAM NAME = "FontPitchAndFamily" VALUE = "2">'); document.write('<PARAM NAME = "DisplayStyle" VALUE = "3">'); document.write('<PARAM NAME = "ShowDropButtonWhen" VALUE = "2">'); document.write('</OBJECT>'); document.write(betweenHeading); document.write('<OBJECT ID = "m2" WIDTH = "221" HEIGHT = "24" CLASSID ='); document.write('"CLSID:8BD21D30-EC42-11CE-9E0D-00AA006002F3">'); document.write('<PARAM NAME = "VariousPropertyBits" VALUE = "746604571">'); document.write('<PARAM NAME = "Size" VALUE = "5574;635">'); document.write('<PARAM NAME = "MatchEntry" VALUE = "1">'); document.write('<PARAM NAME = "FontCharSet" VALUE = "0">'); document.write('<PARAM NAME = "FontPitchAndFamily" VALUE = "2">'); document.write('<PARAM NAME = "DisplayStyle" VALUE = "3">'); document.write('<PARAM NAME = "ShowDropButtonWhen" VALUE = "2">'); document.write('</OBJECT>'); // End --> } </SCRIPT> <!-- Script Size: 6.39 KB -->
1998 Copyright (C) Next Step All Rights Reserved