Hey guys,
Completely new to HTML and Javascript but I thought I would give it a try. I am trying to display a menu whenever someone moves thier mouse over an image or text. I downloaded some Java menus but I can't seem to get the stuff to work correctly.
this is the code as I currently have it.
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0" >
<meta name="ProgId" content="FrontPage.Editor.Document">
<SCRIPT LANGUAGE="JavaScript1.2" SRC="../html/menu/menu.js"></SCRIPT>
<script language ="Javascript1.2" src="../html/menu/menu_api.js"></script>
<script language = "Javascript1.2" src="../html/menu/mymenus.js"></script>
</head>
<body onload="window.showMenu(myMenu);">
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
var myMenu = new Menu();
myMenu.addMenuItem("My menu item A"
;
myMenu.addMenuItem("my menu item B"
;
myMenu.addMenuItem("my menu item C"
;
myMenu.addMenuItem("my menu item D"
;
myMenu.writeMenus();
</SCRIPT>
<A href=window.showMenu(myMenu); title="What the stuff"; onmouseover ="window.showMenu(myMenu);">display myMenu</A>
<P></P>
</body>
</html>
when run this way the menu pops up as soon as the page loads, which I do not want.
If I remove the the <body onload=......> statement I get an error.--'myMenu' undefined.
any assistance is greatly appreciated,
tsmith
Completely new to HTML and Javascript but I thought I would give it a try. I am trying to display a menu whenever someone moves thier mouse over an image or text. I downloaded some Java menus but I can't seem to get the stuff to work correctly.
this is the code as I currently have it.
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0" >
<meta name="ProgId" content="FrontPage.Editor.Document">
<SCRIPT LANGUAGE="JavaScript1.2" SRC="../html/menu/menu.js"></SCRIPT>
<script language ="Javascript1.2" src="../html/menu/menu_api.js"></script>
<script language = "Javascript1.2" src="../html/menu/mymenus.js"></script>
</head>
<body onload="window.showMenu(myMenu);">
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
var myMenu = new Menu();
myMenu.addMenuItem("My menu item A"
myMenu.addMenuItem("my menu item B"
myMenu.addMenuItem("my menu item C"
myMenu.addMenuItem("my menu item D"
myMenu.writeMenus();
</SCRIPT>
<A href=window.showMenu(myMenu); title="What the stuff"; onmouseover ="window.showMenu(myMenu);">display myMenu</A>
<P></P>
</body>
</html>
when run this way the menu pops up as soon as the page loads, which I do not want.
If I remove the the <body onload=......> statement I get an error.--'myMenu' undefined.
any assistance is greatly appreciated,
tsmith