|
Rank: Newbie Groups: Member
Joined: 11/4/2009 Posts: 4
|
Hello, I am trying to make a Menu like the one used in the following site. https://www.allianz.de/please go "Privatkunden" / "Produkte". Notice that, with just a Hover, the third level menu is openned. I was wondering to use something like a floating div for the third level, but it just works with the click, not with the hover function. I used the behavior attribute OnClickScript, inserting a javascript code like "document.getElementById('pop').style.display='block';" but it works with a click not with the hover. Do you have any better idea, or something already done for that! Thanks in advance one more time, Dan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I think your method is a good way to do it. I do not know what you mean by "but it works with a click not with the hover", isn't that exactly what you wanted?
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 11/4/2009 Posts: 4
|
Hi,
first of all I would like to thank you for the prompt reply and support.
When I said "but it works with a click not with the hover", I have tried to say that what I really want is to get the third level menu expanded just with the hover action not with the click action.
In order to make myself clear, what I want to know is if exists something like a OnHoverScript instead of OnClickScript for the third level item in EO?
Thanks in advance one more time,
Dan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, Yes. You would need to handle ClientSideOnItemMouseOver. It is for hover event but there are several differences between ClientSideOnItemMouseOver and OnClickScript: 1. ClientSideOnItemMouseOver is on the Menu, OnClickScript is on MenuItem. So the ClientSideOnItemMouseOver handles hover event for all menu items. Thus inside the handler you will want to check which item triggered ClientSideOnItemMouseOver event; 2. ClientSideOnItemMouseOver takes a JavaScript function name, not JavaScript code. If you are not already familiar with our client side JavaScript interface, you will want to take a look of this: http://doc.essentialobjects.com/library/1/clientapi_howto.aspxThanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/4/2009 Posts: 4
|
Hi,
I succeed in configuring the hover in the menu, but now I do not succeed in getting the specific ItemID of the menu Item.
I create a function like the following :
<script type="text/javascript"> function name(itemID) { alert(itemID); if (itemID = "auto") { document.getElementById('pop').style.display = 'block'; } } </script>
but the alert message shows [object] as my itemID, not the itemID itself. I was expecting an "auto" ItemID, not an empty one like [object].
This project is almost done, I just need to know how to get the menuItem ItemID inside my javascript function.
Do you have any idea?
thanks,
Dan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Have you read the link that I provided to you in my previous post?
Thanks
|
|