...

View Full Version : JavaScript Drop-down Nav Menu Recommendations



Tristan Gray
08-11-2005, 02:58 PM
I am looking for a JavaScript menu for my site that will enable me to set the links in an external file so that if I update the links in the future they will update across all pages on the site. I am looking for the basic drop down javamenu but it must be able to be placed inside a table element so that I can position it easily on my page. The idea is tables as follows:



+----------------------+
| banner image |
+----------------------+
| navigation menu |
+----------------------+
| body content |
| |
| |
+----------------------+
| footer |
+----------------------+

Anyway, I know that there are a lot of options out there and I figured you guys would probably know the best of them.

vwphillips
08-11-2005, 04:10 PM
with the simplest of menus



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title></title>

<script language="JavaScript" type="text/javascript">
<!--
// put this in an external JavaScript
var LinkAry=new Array();
LinkAry[0]='http://www.js-examples.com';
LinkAry[1]='http://www.sitepoint.com';
LinkAry[2]='http://www.codingforums.com';
LinkAry[3]='http://www.vicsjavascripts.org.uk';
//-->
</script>


<script language="JavaScript" type="text/javascript">
<!--

function Link(n){
if (window['LinkAry']){
window.top.location=LinkAry[n];
}
}

//-->
</script>

</head>

<body>
<table width="500" border="1">
<tr>
<td>.</td>
<td>.</td>
<td>.</td>
</tr>
<tr>
<td colspan="3" >
<table width="100%" height="20" border="1">
<tr>
<td onclick="Link(0);">Link 0</td>
<td onclick="Link(1);">Link 1</td>
<td onclick="Link(2);">Link 2</td>
<td onclick="Link(3);">Link 3</td>
</tr>
</table>

</td>
</tr>
<tr>
<td>.</td>
<td>.</td>
<td>.</td>
</tr>
</table>
</body>

</html>

Tristan Gray
08-12-2005, 01:11 PM
Thanks, that is really neat but it won't really do drop downs for say two tiers or anything right? I think I may have a script but the real trouble is just that the fellow I need the script for doesn't jive with CSS otherwise we'd just use a CSS drop down menu.

iota
08-12-2005, 01:24 PM
What about the ones in http://www.twinhelix.com ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum