onMouseover doesn't work correct

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Neo
Advanced
Advanced
Posts: 21
Joined: Sat Oct 04, 2003 4:10 pm

onMouseover doesn't work correct

Post by Neo »

when i want top use the Static HTML Object Based Menu Sample it works, but if i try it on my own websites it doesn't work.
Why???
Here are the relevant parts of my code:

Code: Select all

<head>
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>	
<script	language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");		
  else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>"); 
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>
.
.
.

Code: Select all

 <tr> 
            <td class="links"> <a href="#" onmouseover="popup('Ergebnisse')" onmouseout=popdown()>Ergebnisse</a></div></td>
          </tr>
on the sample i've downloaded it works, so it is not caused by my security settings
Neo
Advanced
Advanced
Posts: 21
Joined: Sat Oct 04, 2003 4:10 pm

Post by Neo »

Does noone know an answer to this problem???
URL:http://finnland.gat-mechernich.de/ergebnisse.html
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

What do I know:(

How about:
onmouseout="popdown()"

maz
Neo
Advanced
Advanced
Posts: 21
Joined: Sat Oct 04, 2003 4:10 pm

Post by Neo »

BAD FAULT of mine, but is not a conclusion to my prob.
The Problem is with the popup.
it says something about _m[...] is 0 or undefined and _menuCloseDelay is undefined.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

You show the call to menu_data.js in your message above, but I don't see it in the actual source code for your page.
John
Neo
Advanced
Advanced
Posts: 21
Joined: Sat Oct 04, 2003 4:10 pm

Post by Neo »

And that's correct, because if i place it inside i get a menu at the top of the page.
WOW now it works.
I just forgot to include it and set it to alwaysvisible=0.
Thanks so far.
-------------------------------------------------------------------------------------
New Question:
How can I position the menu? In the Sample text it's said but i can't get a clue on where to add the Parameters:
popup() can be passed 2 parameters. menuname and also a toggle for opening menus by mouse position. The Milonic DHTML Menu constantly monitors the X and Y positions of the mouse position for use within the menu system or any other JavaScript functions. The parameter names are case sensitive and are MouseX & MouseY. Note that you can only reference these 2 variables after the file milonic_src.js has been executed. The command popup("menuname",1) will open a menu positioned closest to the mouse. Note that offsets can be applied to top and left properties to fine tune the position of submenus opened with the popup("menuname",1) command.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

You're welcome.

You might want to consider taking the shadow filter off the menu, or moving it up about 5px or so. When the menu pops on the rest of the page drops down a bit, and then back up again when the menu pops off. It's a little annoying.
John
Neo
Advanced
Advanced
Posts: 21
Joined: Sat Oct 04, 2003 4:10 pm

Post by Neo »

*g
see posting above
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

THe menu samples show how to use it. But basically you use popup on objects in a page to try and get a menu to open when they are clicked.

Say you have a hyperlink....you could have a menu pop up when you click the hyperlink.

<a href="#" onClick=popup('menu1')>Click Me</a>

And this would make the menu named menu1 appear whereever its supposed to appear on the page (whatever menu1's top and left coordinates are). But if you leave its top and left coordinates blank, you can say...

<a href="#" onClick=popup('menu1',1)>Click Me</a>

And this will make menu1 appear whereever your mouse pointer happens to be when you click the hyperlink. Hope this helps.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Neo
Advanced
Advanced
Posts: 21
Joined: Sat Oct 04, 2003 4:10 pm

Post by Neo »

thanks alot
Post Reply