Checkboxlist add onchange event

  • Thread starter Thread starter Jason Hartsoe
  • Start date Start date
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
 
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)
 
Back
Top