I have a javascript function and need to add it to some dynamically created radio buttons onclick from code behind.
I’ve tried – newRadioSelect.Attributes.Add(“onlick”, “javascript:toggle(this);”)
The code above adds it to the span tag that the radio button creates, any ideas how to get it on the input tag of the radio buttons?
Thanks
J.
A bit like buses, nothing for ages then 2 come along at once.
I worked out a way to do it and got it working and then I received an answer from somewhere else, so thought I’d put them both on here.
My version (not the best)
Better version
Thanks to those who helped.