Event On Radio Button Selection - JavaScript - EJ 2 - Syncfusion

  • Contact Us
  • Blog
  • Sign In
Search Find anything about our product, documentation, and more. Blazor Components | 70+ Native UI Controls | Syncfusion® https://www.syncfusion.com/blazor-components The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps. .NET PDF Framework | C# / VB.NET PDF API | Syncfusion® https://www.syncfusion.com/pdf-framework/net .NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET. 155+ Xamarin UI controls for iOS, Android & UWP apps | Syncfusion® https://www.syncfusion.com/xamarin-ui-controls Over 155 Xamarin UI controls to create cross-platform native mobile apps for iOS, Android, UWP and macOS platforms from a single C# code base. My Dashboard SIGN OUT
  1. Home
  2. Forum
  3. JavaScript - EJ 2
  4. Event on Radio button selection
Event on Radio button selection
  • 1 Reply
  • 2 Participants
  • Created by SA Saravanan
  • PlatformJavaScript - EJ 2
  • PlatformJavaScript - EJ 2
  • ControlButtonGroup
  • Created OnOct 15, 2019 12:35 PM UTC
  • Last Activity OnOct 16, 2019 11:55 AM UTC
  • Want to subscribe? SIGN IN
Hi, Following link shows how to create button group for single selection.https://ej2.syncfusion.com/javascript/demos/#/fabric/button/button-group.htmlHowever, there is no API or method for onclick event of radio button selection.Can you pls share some sample for on click event for button group SIGN IN To post a reply. 1 Reply SD Saranya Dhayalan Syncfusion Team October 16, 2019 11:55 AM UTC Hi Saravanan, Thank you for contacting Syncfusion support. We have checked your query and it can be achieved by using JavaScript “onclick” event for an input element. We have created simple sample based on your scenario. Please refer the below code snippet and sample link. HTML
<pclass="h5">Radioselection</p> <divid="text"class="e-btn-group"> <inputtype="radio"id="left"name="align"value="left"> <labelclass="e-btn"for="left">Left</label> <inputtype="radio"id="center"name="align"value="center"> <labelclass="e-btn"for="center">Center</label> <inputtype="radio"id="right"name="align"value="right"> <labelclass="e-btn"for="right">Right</label> </div>
JAVASCRIPT
document.getElementById('left').onclick = function () { console.log('You clicked left radio button'); } document.getElementById('center').onclick = function () { console.log('You clicked center radio button'); } document.getElementById('right').onclick = function () { console.log('You clicked right radio button'); }
Sample link: https://stackblitz.com/edit/8zqwa8-xmar36?file=index.js Could you please check the above sample and get back to us If you need further assistance on this? Regards, Saranya D Need More Help?

Get personalized assistance from our support team.

Contact Support SIGN IN To post a reply.
  • 1 Reply
  • 2 Participants
  • Want to subscribe? SIGN IN
  • Created by SA Saravanan
  • PlatformJavaScript - EJ 2
  • ControlButtonGroup
  • Created OnOct 15, 2019 12:35 PM UTC
  • Last Activity OnOct 16, 2019 11:55 AM UTC
Need More Help?

Get personalized assistance from our support team.

Contact Support Loader. 12/23/2025 09:26:54 PM Sun, 15 December 2024 03:30:00 UTC Sun, 15 December 2024 03:30:00 AM Wed, 16 Feb 2022 04:59:00 UTC Up arrow icon

Từ khóa » Html Javascript Radio Button Onclick