The Laughing Cow
18-01-2001, 20:06
hi, i use a script similar to the gameplay one above with the drop down menu.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<script language="JavaScript" src="navcond.js"></script>
<script language="JavaScript">
var myNavBar1 = new NavBar(0);
var dhtmlMenu;
dhtmlMenu = new NavBarMenu(100, 0);
dhtmlMenu.addItem(new NavBarMenuItem("Home", "index.shtml"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Services", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Hosting", "hosting.shtml"));
dhtmlMenu.addItem(new NavBarMenuItem("Web Page Design", "design.shtml"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(110, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Portfolio", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Broken Windows", "index.shtml"));
dhtmlMenu.addItem(new NavBarMenuItem("CES Alarms", "index.shtml"));
//dhtmlMenu.addItem(new NavBarMenuItem("Other", "index.shtml"));
//dhtmlMenu.addItem(new NavBarMenuItem("Other", "index.shtml"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 150);
dhtmlMenu.addItem(new NavBarMenuItem("Windy", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Team", "team.shtml"));
dhtmlMenu.addItem(new NavBarMenuItem("Jobs", "jobs.shtml"));
dhtmlMenu.addItem(new NavBarMenuItem("Admin", "admin.shtml"));
dhtmlMenu.addItem(new NavBarMenuItem("Contact", "contact.shtml"));
myNavBar1.addMenu(dhtmlMenu);
//dhtmlMenu = new NavBarMenu(100, 150);
//dhtmlMenu.addItem(new NavBarMenuItem("TBA", ""));
//dhtmlMenu.addItem(new NavBarMenuItem("TBA", "index.shtml"));
//dhtmlMenu.addItem(new NavBarMenuItem("TBA", "index.shtml"));
//dhtmlMenu.addItem(new NavBarMenuItem("TBA", "index.shtml"));
//dhtmlMenu.addItem(new NavBarMenuItem("TBA", "index.shtml"));
//myNavBar1.addMenu(dhtmlMenu);
//set menu colors
myNavBar1.setColors("#000066", "#ffffff", "#000066", "#ffffff", "#6600cc", "#ffffff", "#6699ff", "#ffffff", "#6600cc")
//uncomment below line to center the menu (valid values are "left", "center", and "right"
myNavBar1.setAlign("center")
var fullWidth;
function init() {
fullWidth = getWindowWidth()
- (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);
myNavBar1.moveTo(0,0)
myNavBar1.create();
myNavBar1.setzIndex(2);
}
</script>
</head>
<body onload="init()" bgcolor="#FFFFFF">
</body>
</html>
I then incorporate this page into all my other pages with a SSI. How can i get the menu to be in the middle of the page?
i assume its this line here
myNavBar1.moveTo(0,0)
i change the X component so its ok at 1024 but at 800*600 its off to the right. Any ideas?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<script language="JavaScript" src="navcond.js"></script>
<script language="JavaScript">
var myNavBar1 = new NavBar(0);
var dhtmlMenu;
dhtmlMenu = new NavBarMenu(100, 0);
dhtmlMenu.addItem(new NavBarMenuItem("Home", "index.shtml"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Services", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Hosting", "hosting.shtml"));
dhtmlMenu.addItem(new NavBarMenuItem("Web Page Design", "design.shtml"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(110, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Portfolio", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Broken Windows", "index.shtml"));
dhtmlMenu.addItem(new NavBarMenuItem("CES Alarms", "index.shtml"));
//dhtmlMenu.addItem(new NavBarMenuItem("Other", "index.shtml"));
//dhtmlMenu.addItem(new NavBarMenuItem("Other", "index.shtml"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 150);
dhtmlMenu.addItem(new NavBarMenuItem("Windy", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Team", "team.shtml"));
dhtmlMenu.addItem(new NavBarMenuItem("Jobs", "jobs.shtml"));
dhtmlMenu.addItem(new NavBarMenuItem("Admin", "admin.shtml"));
dhtmlMenu.addItem(new NavBarMenuItem("Contact", "contact.shtml"));
myNavBar1.addMenu(dhtmlMenu);
//dhtmlMenu = new NavBarMenu(100, 150);
//dhtmlMenu.addItem(new NavBarMenuItem("TBA", ""));
//dhtmlMenu.addItem(new NavBarMenuItem("TBA", "index.shtml"));
//dhtmlMenu.addItem(new NavBarMenuItem("TBA", "index.shtml"));
//dhtmlMenu.addItem(new NavBarMenuItem("TBA", "index.shtml"));
//dhtmlMenu.addItem(new NavBarMenuItem("TBA", "index.shtml"));
//myNavBar1.addMenu(dhtmlMenu);
//set menu colors
myNavBar1.setColors("#000066", "#ffffff", "#000066", "#ffffff", "#6600cc", "#ffffff", "#6699ff", "#ffffff", "#6600cc")
//uncomment below line to center the menu (valid values are "left", "center", and "right"
myNavBar1.setAlign("center")
var fullWidth;
function init() {
fullWidth = getWindowWidth()
- (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);
myNavBar1.moveTo(0,0)
myNavBar1.create();
myNavBar1.setzIndex(2);
}
</script>
</head>
<body onload="init()" bgcolor="#FFFFFF">
</body>
</html>
I then incorporate this page into all my other pages with a SSI. How can i get the menu to be in the middle of the page?
i assume its this line here
myNavBar1.moveTo(0,0)
i change the X component so its ok at 1024 but at 800*600 its off to the right. Any ideas?