We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to get the text or Id of clicked menu item, on clientclick event in javascript?

Thread ID:





124261 May 27,2016 08:41 AM UTC Jun 2,2016 05:16 AM UTC ASP.NET Web Forms 3
Tags: Menu
Asked On May 27, 2016 08:41 AM UTC

I need to get the text or ID of the menu item where i clicked. How do i do it with javascript on clientclick event. Please help.

Dhivyalakshmi Thirumurugan [Syncfusion]
Replied On May 30, 2016 10:52 AM UTC

Hi kalum,   
Thanks for contacting Syncfusion support.   
We can get the text of the clicked menu item using ClientSideOnClick event. Please check the below code.   
<ej:Menu ID="Menu1" runat="server"  ClientSideOnClick="onCreate">   
                <ej:MenuItem Id="Products" Text="Products"></ej:MenuItem>   
                <ej:MenuItem Id="Support" Text="Support"></ej:MenuItem>   
                <ej:MenuItem Id="Purchase" Text="Purchase"></ej:MenuItem>   
In Script side, please do the following.   
        function onCreate(sender) {   
            console.log(sender.text + " " +  "is clicked");   
We have created a sample for your requirement.   
Please refer the below sample link:  
Please let us know, if you need any further assistance.    

Replied On June 1, 2016 11:38 AM UTC

Problem sorted out with the help of your sample. Thank you very much.

Kasithangam C [Syncfusion]
Replied On June 2, 2016 05:16 AM UTC

Hi Kalum, 
Thanks for your update. Please get back to us if you have further queries. We will be happy to help you out. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon