little_lisa
11-11-2003, 03:14 PM
Ive been fiddling with a script from html goodies.
The drop down menu works fine, however I would like the submenu to disappear went the main heading is clicked on for a second time.
IE menu heading = welcome
submenu = about us
submenu = FAQ
etc etc
When "welcome" is clicked on, the submenu drops down. I would like the submenu to then disapear when "welcome" is clicked on again.
Is this possible using the code below.
Please note this script is used with a frames page.
CODE
<HTML>
<TITLE>Pull-Down Menus</TITLE>
<HEAD>
<STYLE TYPE="text/css">
#menu1 { display : none }
#menu2 { display : none }
#menu3 { display : none }
#menu4 { display : none }
#menu5 { display : none }
a:link {color:black; text-decoration:none}
a:hover {color:pink; text-decoration:underline}
</STYLE>
<HEAD>
<BODY BGCOLOR="FFFFFF">
<TABLE BORDER="0" ALIGN="left">
<TR>
<TD VALIGN="top" WIDTH="200">
<SPAN onClick="document.all.menu1.style.display = 'block'">
<b><IMG SRC="http://www.cakedesigners.co.uk/barpinkwelcome.gif"></b></SPAN><BR>
<SPAN ID="menu1" onClick="document.all.menu1.style.display = 'block'">
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/welcome.html" TARGET="right">Welcome</a></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/comments.html" TARGET="right">Testimonials</A></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/mailorder.html" TARGET ="right">Mail Order</A></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/FAQ.html" TARGET ="right">Shopping & FAQ</A></FONT>
</SPAN>
</TD>
</TR>
<TR>
<TD VALIGN="top" WIDTH="200">
<SPAN onClick="document.all.menu2.style.display = 'block'">
<b><IMG SRC="http://www.cakedesigners.co.uk/barpinkgallery.gif"></b></SPAN><BR>
<SPAN ID="menu2" onClick="document.all.menu2.style.display = 'none'">
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/novelty1.html TARGET ="right">Novelty Cake Pictures</A></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/occasion.html" TARGET ="right">Celebration Cake Pictures</A></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/photo.html" TARGET ="right">Photo Cake Pictures</A></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/mailorder.html" TARGET ="right">Mail Order Cake Pictures</A></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/wedding.html" TARGET ="right">Wedding Cake Pictures</A></FONT>
</SPAN>
<TD>
</TR>
</TABLE>
</BODY>
</HTML>
Cheers
The drop down menu works fine, however I would like the submenu to disappear went the main heading is clicked on for a second time.
IE menu heading = welcome
submenu = about us
submenu = FAQ
etc etc
When "welcome" is clicked on, the submenu drops down. I would like the submenu to then disapear when "welcome" is clicked on again.
Is this possible using the code below.
Please note this script is used with a frames page.
CODE
<HTML>
<TITLE>Pull-Down Menus</TITLE>
<HEAD>
<STYLE TYPE="text/css">
#menu1 { display : none }
#menu2 { display : none }
#menu3 { display : none }
#menu4 { display : none }
#menu5 { display : none }
a:link {color:black; text-decoration:none}
a:hover {color:pink; text-decoration:underline}
</STYLE>
<HEAD>
<BODY BGCOLOR="FFFFFF">
<TABLE BORDER="0" ALIGN="left">
<TR>
<TD VALIGN="top" WIDTH="200">
<SPAN onClick="document.all.menu1.style.display = 'block'">
<b><IMG SRC="http://www.cakedesigners.co.uk/barpinkwelcome.gif"></b></SPAN><BR>
<SPAN ID="menu1" onClick="document.all.menu1.style.display = 'block'">
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/welcome.html" TARGET="right">Welcome</a></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/comments.html" TARGET="right">Testimonials</A></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/mailorder.html" TARGET ="right">Mail Order</A></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/FAQ.html" TARGET ="right">Shopping & FAQ</A></FONT>
</SPAN>
</TD>
</TR>
<TR>
<TD VALIGN="top" WIDTH="200">
<SPAN onClick="document.all.menu2.style.display = 'block'">
<b><IMG SRC="http://www.cakedesigners.co.uk/barpinkgallery.gif"></b></SPAN><BR>
<SPAN ID="menu2" onClick="document.all.menu2.style.display = 'none'">
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/novelty1.html TARGET ="right">Novelty Cake Pictures</A></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/occasion.html" TARGET ="right">Celebration Cake Pictures</A></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/photo.html" TARGET ="right">Photo Cake Pictures</A></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/mailorder.html" TARGET ="right">Mail Order Cake Pictures</A></FONT><BR>
<FONT SIZE="3"> <A HREF="http://www.cakedesigners.co.uk/wedding.html" TARGET ="right">Wedding Cake Pictures</A></FONT>
</SPAN>
<TD>
</TR>
</TABLE>
</BODY>
</HTML>
Cheers