Checkboxlist add onchange event

J

Jason Hartsoe

i've tried to add an onchange event to my checkboxes(created dynamically)

chkboxlist.attributes.add("onchange", "dothat();")

but it renders the onchange to the table it creates and not to the list
items. I need to add the onchange event to all the checkbox(s) that are
created dynamically. I've even tried

dim li as ListItem
for each li in chkboxlist
li.attributes.add("onchange", "dothat();")
next

but it still renders to the table that the chkboxlist creates rather than
the items.

Can this be done? If so can someone give some good examples?


thanks!

jason
 
B

bruce barker

the checkboxes are rendered as html, not control, so this can not be
done serverside. you need to attach the click handlers with client
script, or override the render of the clicklist.

-- bruce (slwork.com)
 

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

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top