HighTechTalks DotNet Forums  

Adding a client event handler to tags other than the tagkey

ASP.net Web Controls microsoft.public.dotnet.framework.aspnet.webcontrols


Discuss Adding a client event handler to tags other than the tagkey in the ASP.net Web Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Nathan Sokalski
 
Posts: n/a

Default Adding a client event handler to tags other than the tagkey - 10-31-2007 , 10:23 PM






I want to add a client-side onchange event to the input tag generated by a
CheckBox Control. However, because the CheckBox generates the following set
of tags:

<span><input/><label></label></span>

If I try to add the onchange attribute to the CheckBox Control it is added
to the span tag instead of the input tag (I understand why, so there is no
need to explain that). The only way I can think of to add a client-side
event handler to the input tag would be to use the RegisterStartupScript
method to create JavaScript that adds an event handler. I know the ID of the
input tag, but I am having trouble getting the JavaScript correct to add the
eventhandler. Can someone help me? Thanks.
--
Nathan Sokalski
njsokalski (AT) hotmail (DOT) com
http://www.nathansokalski.com/



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.