PC Review


Reply
Thread Tools Rate Thread

Checkboxlist add onchange event

 
 
Jason Hartsoe
Guest
Posts: n/a
 
      1st Aug 2008
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


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      1st Aug 2008
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)

Jason Hartsoe wrote:
> 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
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OnChange Event PeterM Microsoft Access 4 17th Mar 2010 01:46 PM
OnChange event =?Utf-8?B?Q2FybCBHcm9zcw==?= Microsoft Access Database Table Design 1 6th Jul 2007 02:05 AM
OnChange Event =?Utf-8?B?UmljaA==?= Microsoft Windows 2000 Advanced Server 1 14th Apr 2006 04:28 AM
Checkboxlist inside Repeater - doesn't fire click event for Checkboxlist JD Microsoft ASP .NET 3 16th Jun 2004 01:57 AM
OnChange Event DJM Microsoft Access Form Coding 0 14th Aug 2003 08:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:12 PM.