Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

menus

Status
Not open for further replies.

ts2032

Technical User
Mar 26, 2002
115
US
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=&quot;Content-Language&quot; content=&quot;en-us&quot;>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=unicode&quot;>
<meta name=&quot;GENERATOR&quot; content=&quot;Microsoft FrontPage 4.0&quot; >
<meta name=&quot;ProgId&quot; content=&quot;FrontPage.Editor.Document&quot;>
<SCRIPT LANGUAGE=&quot;JavaScript1.2&quot; SRC=&quot;../html/menu/menu.js&quot;></SCRIPT>
<script language =&quot;Javascript1.2&quot; src=&quot;../html/menu/menu_api.js&quot;></script>
<script language = &quot;Javascript1.2&quot; src=&quot;../html/menu/mymenus.js&quot;></script>


</head>
<body onload=&quot;window.showMenu(myMenu);&quot;>

<SCRIPT LANGUAGE=&quot;JavaScript1.2&quot;>
<!--

var myMenu = new Menu();
myMenu.addMenuItem(&quot;My menu item A&quot;);
myMenu.addMenuItem(&quot;my menu item B&quot;);
myMenu.addMenuItem(&quot;my menu item C&quot;);
myMenu.addMenuItem(&quot;my menu item D&quot;);
myMenu.writeMenus();

</SCRIPT>




<A href=window.showMenu(myMenu); title=&quot;What the stuff&quot;; onmouseover =&quot;window.showMenu(myMenu);&quot;>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
 
SalShaikh,

I downloaded them from the internet. I can send you the files, but as far as posting the script: A> I don't think I can, B> I don't know how, and C> I don't have anything related to Java software on my computer.

I remedied the problem by replacing the showMenu(myMenu) statement with &quot;window.hideMenu(myMenu);&quot; to the <body onload> statement(tag)

Thank you for your response.

tsmith
tsmith1@elp.rr.com
 
Hi, this where u got the script from right?? Well, I used tha script last year and had disastrous results, to begin with it crashed the NS4 and IE5.5 browsers on every testing phase...
I would not recommened it...if you need a menu like that (and one tha works great) email me and I can email u a script tha I use now...or, you can go to Hope I hlped ya... I have not failed; I merely found 100,000 different ways of not succeding...
 
Thanks, I will look at them.

tsmith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top