Within my C# web application,
I am attempting to trigger an Ajax HoverMenuExtender using JavaScript, rather than relying on hovering over a designated control.
When I set the TargetControlID of the HoverMenuExtender to a control on the page and hover over it with the mouse, the hover menu appears; however, I am unable to make it display by manually invoking it with JavaScript.
The current JavaScript code I am experimenting with:
popup = $("body").find('HME1');
popup.show();
//popup._popupBehavior.show();
I have debugged the code and verified that popup.show() is being executed. Yet, it seems like nothing happens. It appears that .Show may not be the correct method, and we may need to "Invoke" the AjaxExtender in a different way.
The HoverMenuExtender setup:
<cc1:HoverMenuExtender ID="HME1" runat="server" BehaviorID="HME1" TargetControlID="dummyLink" PopupPosition="Top" PopupControlID="PopupMenu"></cc1:HoverMenuExtender>
A dummy link where I assign the control ID:
<a href="#" style="display:none;visibility:hidden;" onclick="return false" ID="dummyLink" runat="server">dummy</a>
The panel I am aiming to show:
<asp:Panel CssClass="popupMenu" ID="PopupMenu"
runat="server">
<asp:LinkButton ID="article" runat="server"
CommandName="Edit" Text="Edit" />
<br />
<asp:LinkButton ID="LinkButton2" runat="server"
CommandName="Delete" Text="Delete" />
</asp:Panel>