Click to See Complete Forum and Search --> : NEED HELP WITH DHTML FLYOUT MENU


RAMIRO
02-19-2002, 04:50 PM
I AM A ROOKIE HTML DESIGNER BARELY LEARNING THE ROPES BUT I WOULD REALLY LIKE
TO INCLUDE A DHTML FLYOUT MENU IN MY WEBSITE. CAN YOU PLEASE HELP ME

Michael
02-26-2002, 04:33 PM
This menu works well and is pretty simple. You can change the the lists that
appear to links. Note, the link on the menu headings only works if the browser
doesnt understand JavaScript. Those links should take you to pages for non
javascript browsers.

~~Javascript part inside head tags
<SCRIPT TYPE="TEXT/JAVASCRIPT" LANGUAGE="JAVASCRIPT">
<!-- Hide script from older browsers

function toggleMenu(currMenu) {
if (document.getElementById) {
thisMenu = document.getElementById(currMenu).style
if (thisMenu.display == "block") {
thisMenu.display = "none"
}
else {
thisMenu.display = "block"
}
return false
}
else {
return true
}
}

// End hiding script -->
</SCRIPT>

~~~~~~~~Styles part inside the head tags

<STYLE TYPE="TEXT/CSS">
<!--

.menu {display:none; margin-left:20px}

-->
</STYLE>

~~~~~~html part

<H1>Movie Listings</H1>
<H3>
<A HREF="page1.html" onClick="return toggleMenu('menu1')">Comedy</A>
</H3>
<SPAN CLASS="menu" ID="menu1">
Movie One<BR>
Movie Two<BR>
Movie Three<BR>
Movie Four
</SPAN>
<H3>
<A HREF="page2.html" onClick="return toggleMenu('menu2')">Drama</A>
</H3>
<SPAN CLASS="menu" ID="menu2">
Movie 1<BR>
Movie 2<BR>
Movie 3
</SPAN>
<H3>
<A HREF="page3.html" onClick="return toggleMenu('menu3')">Plays</A>
</H3>
<SPAN CLASS="menu" ID="menu3">
Theater One<BR>
Theater Two
</SPAN>




"RAMIRO" <JEROB79@AOL.COM> wrote:
>
>I AM A ROOKIE HTML DESIGNER BARELY LEARNING THE ROPES BUT I WOULD REALLY
LIKE
>TO INCLUDE A DHTML FLYOUT MENU IN MY WEBSITE. CAN YOU PLEASE HELP ME