View Full Version : Dreaded Drop Down Menus!


vicary
05-30-2003, 03:16 AM
I just don't understand what is meant by this:
It's really important to remember that if you're going to use more than one drop down menu on your page, you'll have to name your forms differently. Replace the words "lissamenu1" or lissamenu2" with a different name on your page. If you don't have different names for your forms you will get a script error.
I am just not understanding. Do I replace my menu.html page with this script below or do I just add these scripts (2 drop down menus) to each of my .html pages of my site? If so, what do I replace "lissamenu1" and "lissamenu2" with exactly? What different name on my page do i replace those with?
Thanks for all help!

<script language="javascript">
function jump(form) {
var myindex=form.menu.selectedIndex
if (form.menu.options[myindex].value != "0")
{
window.open(form.menu.options[myindex].value,
target="home.html");
}
}
//-->
</script>

<form name="lissamenu2">
<select name="menu" style="background-color: #000000 ;
font size=10 ; font-family: verdana; color:#ffffff"
size="1" onchange="jump(this.form)">

<option value="0">Where to?</option> <--add a "header" here (don't include this in your code).
<option value="0"></option> <--this adds a space (don't include this in your code).
<option value="http://www.vicarybiznis.com">Home</option>
<option value="http://www.vicarybiznis.com/faq.html">FAQ</option>
<option value="http://www.vicarybiznis.com/bcs.html">Business Card Samples</option>
<option value="http://www.vicarybiznis.com/bcs.html">Business Card Samples</option>
<option value="http://www.vicarybiznis.com/monologo.html">Monograms & Logos</option>
<option value="http://www.vicarybiznis.com/smbus.html">Small Businesses</option>
<option value="http://www.vicarybiznis.com/payments.html">Payments</option>
<option value="http://www.vicarybiznis.com/orderform.html">Orderform</option>
<option value="http://www.vicarybiznis.com/contact.html">Contact</option>
<option value="http://www.vicarybiznis.com/pricing.html">Pricing Guide</option>
</select>
</form>

<script language="javascript">
function jump(form) {
var myindex=form.menu.selectedIndex
if (form.menu.options[myindex].value != "0")
{
window.open(form.menu.options[myindex].value,
target="home.html");
}
}
//-->
</script>

<form name="lissamenu2">
<select name="menu" style="background-color: #C0C0C0 ;
font size=10 ; font-family: verdana; color:#ffffff"
size="1" onchange="jump(this.form)">

<option value="0">Websets</option>
<option value="http://www.vicarybiznis.com/wsd1.html">Webset Designs</option>
<option value="http://www.vicarybiznis.com/profset/profset.html">Professional Series</option>
<option value="http://www.vicarybiznis.com/flowergarden/flowergarden.html">Flower Garden</option>
<option value="http://www.vicarybiznis.com/gorillathreat/gorillathreat.html">Gorilla Threat</option>
<option value="http://www.vicarybiznis.com/pantherpride/pantherpride.html">Panther Pride</option>

</select>
</form>

vicary
05-30-2003, 03:20 AM
I am using frames, so would it be easier to just not use frames?
Here is my index.html code(part of it).
</head>
<frameset rows=25%,75%>
<frame src="menu.html" name="top" scrolling="no">
<frame src="home.html" name="bottom">
</frameset>
<body>
</body>
<noframes>
Sorry, but your browser does not support frames.
</noframes>
</html>

vicary
05-30-2003, 04:42 AM
<style type="text/css">
<!--

A:link
{ text-decoration: none;
color:#9C914F;
font-family: verdana, arial, lucida sans;
font-weight:normal; }
A:visited
{ text-decoration: none;
color:#BE3B38;
font-family: verdana, arial, lucida sans;
font-weight:normal; }
A:active
{ text-decoration: none;
color:#9C914F;
font-family: verdana, arial, lucida sans;
font-weight:normal; }
A:hover
{ text-decoration: none;
color:#ffffff;
font-family: verdana, arial, lucida sans;
font-weight:bold; }

body
{ background-color: #000000;
font-family: verdana, arial, lucida sans;
color: #ffffff ;
letter-spacing: 1pt;
font-weight:normal;
font-size:10pt;
text-align: center;
margin: 10px 10px 10px 10px;

scrollbar-face-color : #9c914f;
scrollbar-highlight-color : #ffffff;
scrollbar-3dlight-color : #000000; scrollbar-shadow-color : #ffffff;
scrollbar-darkshadow-color : #000000; scrollbar-track-color : #000000;
scrollbar-arrow-color : #000000 }


h1{font-size:20pt; font-weight:normal; font-family:verdana;}
-->
</style>
</head>

<script language="javascript">
function jump(form) {
var myindex=form.menu.selectedIndex
if (form.menu.options[myindex].value != "0")
{
window.open(form.menu.options[myindex].value,
target="home.html");
}
}
//-->
</script>


<script language="javascript">
function jump(form) {
var myindex=form.menu.selectedIndex
if (form.menu.options[myindex].value != "0")
{
window.open(form.menu.options[myindex].value,
target="index.html");
}
}
//-->
</script>
<form name="lissamenu2">
<select name="menu" style="background-color: #9C914F;
font size=12 ; font-family: verdana; color:#ffffff"
size="1" onchange="jump(this.form)">

<option value="0">Navigation Bar</option> <--add a "header" here (don't include this in your code).
<option value="0"></option> <--this adds a space (don't include this in your code).
<option value="http://www.vicarybiznis.com">Home</option>
<option value="http://www.vicarybiznis.com/faq.html">FAQ</option>
<option value="http://www.vicarybiznis.com/bcs.html">Business Card Samples</option>
<option value="http://www.vicarybiznis.com/bcs.html">Business Card Samples</option>
<option value="http://www.vicarybiznis.com/monologo.html">Monograms & Logos</option>
<option value="http://www.vicarybiznis.com/smbus.html">Small Businesses</option>
<option value="http://www.vicarybiznis.com/payments.html">Payments</option>
<option value="http://www.vicarybiznis.com/orderform.html">Orderform</option>
<option value="http://www.vicarybiznis.com/contact.html">Contact</option>
<option value="http://www.vicarybiznis.com/pricing.html">Pricing Guide</option>
<option value="http://www.vicarybiznis.com/wsd1.html">Webset Designs</option>
<option value="http://www.vicarybiznis.com/profset/profset.html">~Professional Series</option>
<option value="http://www.vicarybiznis.com/flowergarden/flowergarden.html">~Flower Garden</option>
<option value="http://www.vicarybiznis.com/gorillathreat/gorillathreat.html">~Gorilla Threat</option>
<option value="http://www.vicarybiznis.com/pantherpride/pantherpride.html">~Panther Pride</option>
<option value="http://www.vicarybiznis.com/links.html">Links</option>
<option value="http://www.warsawin.com" target="_blank">Warsaw, IN</option>
<option value="http://www.kconline.com" target="_blank">Kconline</option>
<option value="http://www.000domains.com" target="_blank">000Domains</option>

</select>
</form>


But the links in the drop down menu are still not working!
Do I need to add something to each individual .html page of my site?
Do I need to edit <form name="lissamenu2"> to something else or leave it as it is?
I am lost from here...please help me!