|
|
|
 |
Posted 2007-03-28, 10:03 AM
in reply to Goodlookinguy's post "Help Needed for HTML"
|
 |
 |
 |
The way I've done it on my sites is to have a javascript file separate from any page. Then, on each page, I've got:
<SCRIPT language="Java/HTML" src="/Java and CSS/menu.js" />
Or something like that.
The javascript menu's I've got are completely text, with things in the CSS to make it look pretty.
I'm sure you know that the great thing about this is that you don't have to change every single page if you need to add or delete links. Just change the .js file, and it will change on every page.
The .js file looks something like this, btw:
Code:
<!-- Begin
// NOTE: If you use a ' add a slash before it like this \'
document.write('<DIV id="menulocation">');
document.write('<TABLE cellpadding=0 cellspacing=0 border=0 width="150"><tr><td>');
// COPY AND PASTE THE NEXT TWO LINES TOO ADD A NEW LINK
document.write('</td></tr><tr><td nowrap>');
document.write('<a href="index.html" class="menu">Home</a>');
document.write('</td></tr><tr><td nowrap>');
document.write('<a href="about.html" class="menu">About Us</a>');
document.write('</td></tr><tr><td nowrap>');
document.write('<a href="contact.html" class="menu">Contact Us</a>');
document.write('</td></tr><tr><td nowrap>');
document.write('<a href="projects.html" class="menu">Future Projects</a>');
document.write('</td></tr><tr><td nowrap>');
document.write('<a href="ineffable.html" class="menu">Ineffable Lenny</a>');
document.write('</td></tr><tr><td nowrap>');
document.write('<a href="muldrum.html" class="menu">Muldrum</a>');
document.write('</td></tr><tr><td nowrap>');
document.write('<a href="brgs.html" class="menu">BRGS - Animated</a>');
document.write('</td></tr><tr><td nowrap>');
document.write('<a href="affiliate.html" class="menu">Affiliates</a>');
document.write('</td></tr><tr><td>');
document.write('</td></tr></table></DIV>');
// End --> |
In fact, that's the whole .js file for the menu on one of my sites.
|
 |
 |
 |
|
|
|
|
|
|
|