adding javascript to radial button group

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top