adding javascript to radial button group

  • Thread starter Thread starter Darrel
  • Start date Start date
D

Darrel

I've added javascript function calls to an HTML control, but I can't seem to
get the syntax to work for individual radio buttons as part of an
ASP:RadioButtonGroup control.

Here's the syntax I'm using on the page_load function:

radioGroup_emailGroup.Items(0).Attributes.Add("onClick", "emailAll();")
radioGroup_emailGroup.Items(1).Attributes.Add("onClick",
"emailAttendees();")
radioGroup_emailGroup.Items(2).Attributes.Add("onClick",
"emailWaitingList();")

It's not giving me an error, but it's not creating an 'onclick' attribute
for the generated HTML either.

-Darrel
 
If you are using an ASP.NET radio button, then you should use the
"CheckedChanged" event other than "onclick"
AS you can see, onclick event is not exist in the ASp.NET radio button
properties.

hope it helps

wei chung
 
Back
Top