How are you generating the radio button list? If you’re just using HTML:
<input type="radio" onclick="alert('hello');"/>
If you’re generating these via something like ASP.NET, you can add that as an attribute to each element in the list. You can run this after you populate your list, or inline it if you build up your list one-by-one:
foreach(ListItem RadioButton in RadioButtons){ RadioButton.Attributes.Add("onclick", "alert('hello');"); }
More info: http://www.w3schools.com/jsref/event_onclick.asp
Related Posts:
- addEventListener vs onclick
- Uncaught ReferenceError: function is not defined with onclick
- CSS Animation onClick
- Execute PHP function with onclick
- Why is this jQuery click function not working?
- HTML img onclick Javascript
- JavaScript button onclick not working
- JavaScript button onclick not working
- Dynamically creating charts of each row in an HTML table with chart.js
- Failed to load resource: the server responded with a status of 500 (Internal Server Error) in Bind function
- Scroll to an element with jQuery
- Cannot open local file – Chrome: Not allowed to load local resource
- How do you reverse a string in-place in JavaScript?
- How to set NODE_ENV to production/development in OS X
- Uncaught TypeError: Cannot read property ‘length’ of undefined
- Python to JavaScript converter
- Set style using pure JavaScript
- Check if element exists in jQuery
- Fastest way to duplicate an array in JavaScript – slice vs. ‘for’ loop
- What is the difference between call and apply?
- AJAX response error: net::ERR_EMPTY_RESPONSE
- TypeError: Cannot Set property ‘onclick’ of null
- Sorting strings in descending order in Javascript (Most efficiently)?
- How do I declare a namespace in JavaScript?
- Remove duplicate values from JS array
- Trying to convert crmForm to Xrm.Page
- Encode HTML entities in JavaScript
- Show/hide ‘div’ using JavaScript
- How do you Hover in ReactJS? – onMouseLeave not registered during fast hover over
- ReactJS: setTimeout() not working?
- How to set ‘X-Frame-Options’ on iframe?
- What is the difference between node.js and io.js?
- module.exports vs exports in Node.js
- Uncaught ReferenceError: define is not defined typescript
- How do I modify the URL without reloading the page?
- Regular expression for removing whitespaces
- How to define Global Arrays?
- JavaScript post request like a form submit
- jQuery count child elements
- javascript check for not null
- How do I check if an element is hidden in jQuery?
- Uncaught Reference Error: stLight is not defined (in Chrome only)
- How to get the selected radio button’s value?
- Google Maps API DeletedApiProjectMapError
- SyntaxError: Unexpected token C in JSON at position 0 – Ionic 2 Http GET request
- Is there a simple way to make a random selection from an array in JavaScript or any other programming language?
- jsPDF fromHTML() does not show HTML
- Uncaught Invariant Violation: Rendered more hooks than during the previous render
- How to get the children of the $(this) selector?
- JavaScript array to CSV
- window.onload vs $(document).ready()
- Detect a finger swipe through JavaScript on the iPhone and Android
- console.log showing contents of array object
- How to sort 2 dimensional array by column value?
- anchor jumping by using javascript
- jQuery scrollTop() method not working
- FormData append not working
- How to convert binary string to decimal?
- parsing JSONP $http.jsonp() response in angular.js
- d3.scale.category20 is too smart for me
- JSLint is suddenly reporting: Use the function form of “use strict”
- wp_add_inline_script without dependency
- How to configure WordPress to be able to use tag inside posts?
- Extend core block in Gutenberg
- How to add JS in footer
- Localhost load-scripts.php Error 500 in Dashboard [closed]
- Javascript not included
- How to run JavaScript function in WooCommerce checkout?
- Accessing customizer values in javascript
- How do display simple page for printing product info? [closed]
- Insert “javascript:void(0);” into URL
- What is the “proper” way to generate a javascript variable depending on a custom field value?
- Render blocking issue in google page insight
- Adding nonce or hashes to inline scripts
- Open MediaUpload from external component in Gutenberg
- WordPress Media Library: Custom tab content displayed in “Media Library” tab
- Manually mark imported photo as selected in media library
- How to retrieve data from database, then pass it to Javascript?
- Call post-id from URL hash not working?
- Easy popups for wordpress?
- Why WordPress not using JSON_UNESCAPED_UNICODE by default?
- WordPress load-scripts.php not loading
- Add script to page at certain location in wordpress
- get_header() in backend – but keep JavaScript and CSS files
- Absolutely print script in footer
- How can I put this JavaScript into WordPress? [closed]
- How do you create your own link preview for my website?
- Need help in fixing javascript in WordPress
- Uncaught TypeError: r is not a function
- How to show cities according to the state in Form using Javascript? [closed]
- Redirect to homepage if attmpting to leave intranet [closed]
- Twenty seventeen theme dropdown menu issue
- How to correctly load this jquery script through the file functions.php?
- Unserialize WP_Options options programatically?
- javascript errors on mobile browser, not on desktop
- Loading 2 Different Version of JS files [closed]
- Adding react app to an existing wordpress website
- Javascript file not included only on home page
- Why is this script not working?
- Astra Mobile Cart Drawer is blank on home page