/*********************************************** * Drop down menu w/ description- © Dynamic Drive (www.dynamicdrive.com) * This notice must stay intact for use * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ //1) CUSTOMIZE TEXT DESCRIPTIONS FOR LINKS ABOVE var thetext1=new Array() thetext1[0]="Southern Specialties" thetext1[1]="Title Page" thetext1[2]="Title and Membership" thetext1[3]="Beverages" thetext1[4]="Beverages" thetext1[5]="Bread" thetext1[6]="Bread" thetext1[7]="Bread" thetext1[8]="Bread" thetext1[9]="Cakes" thetext1[10]="Cakes" thetext1[11]="Cakes" thetext1[12]="Cakes" thetext1[13]="Cakes" thetext1[14]="Cakes" thetext1[15]="Cakes" thetext1[16]="Candies" thetext1[17]="Candies" thetext1[18]="Candies" thetext1[19]="Candies" thetext1[20]="Cheese and Egg Dishes" thetext1[21]="Cookies and Doughnuts" thetext1[22]="Cookies and Doughnuts" thetext1[23]="Fruits" thetext1[24]="Fruits" thetext1[25]="Ice Cream and Sherbets" thetext1[26]="Ice Cream and Sherbets" thetext1[27]="Icings and Fillings" thetext1[28]="Meats" thetext1[29]="Meats" thetext1[30]="Party Plates" thetext1[31]="Pies and Pastries" thetext1[32]="Pies and Pastries" thetext1[33]="Pies and Pastries" thetext1[34]="Pickles" thetext1[35]="Pickles" thetext1[36]="Salads" thetext1[37]="Salads" thetext1[38]="Salads" thetext1[39]="Salads" thetext1[40]="Salads" thetext1[41]="Salad Dressings" thetext1[42]="Salad Dressings" thetext1[43]="Salad Dressings" thetext1[44]="Sandwiches" thetext1[45]="Sandwiches" thetext1[46]="Vegetables" thetext1[47]="Vegetables" thetext1[48]="Puddings" thetext1[49]="Puddings" thetext1[50]="Puddings" thetext1[51]="Desserts" thetext1[52]="Desserts" thetext1[53]="Handwritten Recipes" thetext1[54]="Handwritten Recipes" thetext1[55]="Handwritten Recipes" thetext1[56]="Handwritten Recipes" thetext1[57]="Handwritten Recipes" thetext1[58]="Handwritten Recipes" thetext1[59]="Handwritten Recipes" thetext1[60]="Handwritten Recipes" thetext1[61]="Handwritten Recipes" thetext1[62]="Handwritten Recipes" thetext1[63]="Handwritten Recipes" thetext1[64]="Handwritten Recipes" thetext1[65]="Handwritten Recipes" thetext1[66]="Handwritten Recipes" /// You may define additional text arrays if you have multiple drop downs: var thetext2=new Array() thetext2[0]="CNN- US and World News." thetext2[1]="MSNBC- NBC News online." thetext2[2]="BBC News- Updated every minute of every day." thetext2[3]="TheRegister- Daily IT news." // Now, see 2) below for final customization step function displaydesc(which, descriptionarray, container){ if (document.getElementById) document.getElementById(container).innerHTML=descriptionarray[which.selectedIndex] } function jumptolink(what){ var selectedopt=what.options[what.selectedIndex] if (document.getElementById && selectedopt.getAttribute("target")=="newwin") window.open(selectedopt.value) else window.location=selectedopt.value } //2) Call function displaydesc() for each drop down menu you have on the page // This function displays the initial description for the selected menu item // displaydesc(name of select menu, name of corresponding text array, ID of SPAN container tag): // Important: Remove the calls not in use (ie: 2nd line below if there's only 1 menu on your page) displaydesc(document.form1.select1, thetext1, 'textcontainer1') displaydesc(document.form2.select2, thetext2, 'textcontainer2')




Back to Main Page