lovely_sugar102
09-21-2002, 04:00 PM
I went to www.dynamicdrive.com and found a menu(Top Navigational Bar II). I uploaded the file it says to, and did the code, but the menu WONT SHOW UP!! What's the problem? Here's my code:
<html>
<head>
<script language="JavaScript" src="navcond.js"></script>
<script language="JavaScript">
/*
Top Navigational Bar II (By Mike Hall)
Last updated: 00/05/08
Permission granted and modified by Dynamicdrive.com to include script in archive
For this and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
var myNavBar1 = new NavBar(0);
var dhtmlMenu;
//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub category width in pixels)
//add more menus simply by adding more "blocks" of same code below
dhtmlMenu = new NavBarMenu(100, 0);
dhtmlMenu.addItem(new NavBarMenuItem("Home", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/right.htm'
"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Menu", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Updates", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/updates.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Backgrounds", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/backgrounds.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Blinkies", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/blinkies.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Blogs", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/layouts.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Buttons", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/buttons.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Dividers", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/dividers.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Dollz", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/dollz.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Silents", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/silents.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Puffs", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/puffs.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Welcome Signs", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/welcomes.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Color Quiz", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/quiz.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Great Sites", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/greatsites.html"));
dhtmlMenu.addItem(new NavBarMenuItem("About Me", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/aboutme.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Link To Me", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/linktome.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Contact Me", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/contactme.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Help", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/help.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Resources", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/resources.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Guestbook", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/guestbook.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Poll", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/poll.html"));
myNavBar1.addMenu(dhtmlMenu);
//set menu colors
myNavBar1.setColors("#000000", "#000000", "#C0C0C0", "#ffffff", "#666666", "#000000", "#cccccc", "#ffffff", "#000080")
//uncomment below line to center the menu (valid values are "left", "center", and "right"
//myNavBar1.setAlign("center")
var fullWidth;
function init() {
// Get width of window, need to account for scrollbar width in Netscape.
fullWidth = getWindowWidth()
- (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);
myNavBar1.resize(fullWidth);
myNavBar1.create();
myNavBar1.setzIndex(2);
//UNCOMMENT BELOW LINE TO MOVE MENU DOWN 50 pixels
//myNavBar1.moveTo(0, 50);
}
</script>
</head>
<body>
<body onload="init()">
</body>
</html>
Can you please help? :)
<html>
<head>
<script language="JavaScript" src="navcond.js"></script>
<script language="JavaScript">
/*
Top Navigational Bar II (By Mike Hall)
Last updated: 00/05/08
Permission granted and modified by Dynamicdrive.com to include script in archive
For this and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
var myNavBar1 = new NavBar(0);
var dhtmlMenu;
//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub category width in pixels)
//add more menus simply by adding more "blocks" of same code below
dhtmlMenu = new NavBarMenu(100, 0);
dhtmlMenu.addItem(new NavBarMenuItem("Home", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/right.htm'
"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Menu", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Updates", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/updates.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Backgrounds", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/backgrounds.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Blinkies", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/blinkies.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Blogs", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/layouts.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Buttons", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/buttons.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Dividers", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/dividers.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Dollz", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/dollz.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Silents", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/silents.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Puffs", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/puffs.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Welcome Signs", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/welcomes.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Color Quiz", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/quiz.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Great Sites", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/greatsites.html"));
dhtmlMenu.addItem(new NavBarMenuItem("About Me", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/aboutme.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Link To Me", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/linktome.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Contact Me", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/contactme.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Help", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/help.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Resources", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/resources.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Guestbook", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/guestbook.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Poll", "javascript:parent.right.location='http://www.angelfire.com/al4/home0/poll.html"));
myNavBar1.addMenu(dhtmlMenu);
//set menu colors
myNavBar1.setColors("#000000", "#000000", "#C0C0C0", "#ffffff", "#666666", "#000000", "#cccccc", "#ffffff", "#000080")
//uncomment below line to center the menu (valid values are "left", "center", and "right"
//myNavBar1.setAlign("center")
var fullWidth;
function init() {
// Get width of window, need to account for scrollbar width in Netscape.
fullWidth = getWindowWidth()
- (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);
myNavBar1.resize(fullWidth);
myNavBar1.create();
myNavBar1.setzIndex(2);
//UNCOMMENT BELOW LINE TO MOVE MENU DOWN 50 pixels
//myNavBar1.moveTo(0, 50);
}
</script>
</head>
<body>
<body onload="init()">
</body>
</html>
Can you please help? :)