View Full Version : dynamic menu?

03-04-2004, 01:19 PM
i'm trying to build a menu system.
pretty simple stuff, the user will click on the appropriate option (1 thru 6) and the name of that option will be highlighted and the appropriate text will display in a section below.

any suggestions?

I could use an i-frame here, but would prefer something more DHTML-like.

03-04-2004, 01:38 PM
oops! never mind - solved the problem.


for anyone thats interested, i adapted a script i found:

<!--Links used to initiate the sub menus. Pass in the desired submenu index numbers (ie: 0, 1) -->
<a href="javascript:showit(0)">option0</a> | <a href="javascript:showit(1)">option1</a> | <a href="javascript:showit(2)">option2</a><br>

<!-- Edit the dimensions of the below, plus background color-->
<ilayer width=400 height=32 name="dep1" bgColor="#E6E6FF">
<layer name="dep2" width=400 height=32>
<div id="describe" style="background-color:#E6E6FF;width:400px;height:32px"></div>

<script language="JavaScript1.2">

Tabs Menu (mouseover)- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use

(Modified by Sweenster 2004)

var submenu=new Array()

//Set submenu contents. Expand as needed. For each content, make sure everything exists on ONE LINE. Otherwise, there will be JS errors.

submenu[0]='content option 0 here'

submenu[1]='content option 1 here'

submenu[2]='content option 2 here'

/////No need to edit beyond here

var menuobj=document.getElementById? document.getElementById("describe") : document.all? document.all.describe : document.layers? document.dep1.document.dep2 : ""

function showit(which){
thecontent=(which==-1)? "" : submenu[which]
if (document.getElementById||document.all)
else if (document.layers){

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;