|
Rank: Advanced Member Groups: Member
Joined: 8/22/2007 Posts: 30
|
I've got a menu with a CustomItem. Inside this CustomItem is HTML that has some Anchor tags. When the menu renders, it works great, until you click on an href, and the menu item takes the click and closes the menu, instead of allowing the anchor tag in the CustomItem to handle it.
What am I doing wrong?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Try to set the CustomItem's CancelBubble to true and see if it works for you.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 8/22/2007 Posts: 30
|
Property 'CustomItem' does not have a property named 'CancelBubble'.
How do I set that?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, Do you use embedded CustomItem? If so you can use something like this:
Code: HTML/ASPX
<eo:MenuItem>
<CustomItem>
<div onclick="eo_CancelBubble(event)">
...your original custom item contents go here.....
</div>
</CustomItem>
</eo:MenuItem>
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 8/22/2007 Posts: 30
|
That doesn't work.
Infact, I changed it to this inside the CustomItem:
<div onclick="alert('hi');"> <a href="http://www.cnn.com">cnn.com</a> </div>
.. and the alert box never fired.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Try use onmousedown. The point is you can use a DIV and eo_CancelBubble together to prevent whatever event that is of importance to you from "bubbling up" to the menu.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 8/22/2007 Posts: 30
|
That works! Thanks for your patient and prompt support.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Glad it works for you. Thanks for the update!
|
|