This question is locked. New answers and comments are not allowed.
I am using the mvc extension menu with the content method to one item in which I have a dropdownlist and a search field with a link following. When I try to select something from the dropdown, the menu item closes. I have tried creating onOpen and onClose functions using stopPropagation to keep the menu item open until the link is clicked. However, this is not working. Is this possible or is there something I am missing? Thank you so much for your help!
Here is the code:
Donna
Here is the code:
<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl(Of GMC_Hub_and_Spoke.WQIndexViewModel)" %><%@ Import Namespace="GMC_Hub_And_Spoke" %><%@ Import Namespace="com.gmcps" %><script type="text/javascript"> $(document).ready(function () { $('a#submit_link').click(function () { var menu = $("#OLODReportsMenu").data("tMenu"); menu.close($(".t-item", menu.element)[1]); var specificUrl; var urlFormat; urlFormat = '<%= HttpUtility.UrlDecode(Url.Action("FindOLODReport", "WebQuery", New With { .stringToFind = "{0}", .searchType = "{1}"})) %>'; specificUrl = $.telerik.formatString(urlFormat, $("#stringToFind").val(), $("sType").val()); $("#webquerylist").load(specificUrl); }); }); function onOpen(e) { e.stopPropagation(); var menu = $("#OLODReportsMenu").data("tMenu"); menu.open($(e.item)); } function onClose(e) { alert("in onClose"); e.stopPropagation(); }</script><div> <div id="queryindexleft"> <span class="listbox-label">Online/OnDemand Reports</span><br /> <% Html().Telerik().Menu.Name("OLODReportsMenu").Orientation(Telerik.Web.Mvc.UI.MenuOrientation.Vertical).HtmlAttributes(New With {.style = "width:300px;"}) _ .ClientEvents(Function(events) events.OnOpen("onOpen")).ClientEvents(Function(events) events.OnClose("onClose")) _ .Items(Function(item) item.Add.Text("Add New Online/On Demand Report").Action("AddNew", "WebQuery")) _ .Items(Function(item) item.Add.Text("Find Online/On Demand Report") _ .Content(Sub()%> <div style="width:350px; height:60px;"> <%: Html.DropDownList("sType", Model.searchType, "--Select--")%> <%: Html.Label("Search ")%> <%: Html.TextBox("stringToFind")%> <a href="#" id="submit_link">Go</a> </div> <%End Sub)).Render()%> <br /> <span id="webquerylist"></span> </div> <div id="queryindexright"></div></div>Donna