This is a migrated thread and some comments may be shown as answers.

Rad Menu Close

1 Answer 52 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Wicus
Top achievements
Rank 1
Wicus asked on 23 Jul 2008, 11:17 AM
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!

1 Answer, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 23 Jul 2008, 11:37 AM
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
Tags
Menu
Asked by
Wicus
Top achievements
Rank 1
Answers by
Paul
Telerik team
Share this question
or