Rad Menu Close

2 posts, 0 answers
  1. Wicus
    Wicus avatar
    31 posts
    Member since:
    Jul 2008

    Posted 23 Jul 2008 Link to this post

    Hi all....i have a radMenu which contains 1 root node and 1 child node...i want to enable the child node to close my Internet Explorer....how will i do this...plz help!
  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 23 Jul 2008 Link to this post

    Hello Wicus,

    Please find below a sample code snippet that shows a possible approach.

    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head runat="server">  
        <title>Untitled Page</title> 
        <telerik:RadCodeBlock runat="server">  
     
            <script type="text/javascript">  
            function closeBrowser(sender, eventArgs)  
            {  
                var item = eventArgs.get_item();  
                if(item.get_text() == "Close Browser")  
                {  
                    self.opener = this;  
                    self.close();  
                }  
            }  
            </script> 
     
        </telerik:RadCodeBlock> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
            <asp:ScriptManager ID="ScriptManager1" runat="server">  
            </asp:ScriptManager> 
            <telerik:RadMenu ID="RadMenu1" runat="server" OnClientItemClicking="closeBrowser">  
                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                <Items> 
                    <telerik:RadMenuItem runat="server" Text="Root RadMenuItem1">  
                        <Items> 
                            <telerik:RadMenuItem runat="server" Text="Close Browser">  
                            </telerik:RadMenuItem> 
                        </Items> 
                    </telerik:RadMenuItem> 
                </Items> 
            </telerik:RadMenu> 
        </form> 
    </body> 
    </html> 


    All the best,
    Paul
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top