The title is self-explanatory, but I'll show you all what I've done thus
far.
Here's the aspx side of things(trimmed, of course) and javascript:
<form name="form1" id="Form1" method="post" runat="server">
<table width="100%">
<tr>
<td>
<asp:CheckBoxList Runat="server" id="CheckBoxList1">
<asp:ListItem Value="a">Checked a</asp:listitem>
<asp:ListItem Value="b">Checked b</asp:listitem>
<asp:ListItem Value="c">Checked c</asp:listitem>
<asp:ListItem Value="d">Checked d</asp:listitem>
<asp:ListItem Value="e">Checked e</asp:listitem>
</asp:CheckBoxList>
</td>
</tr>
<tr>
<td>
<div><b><i>Action notes</i></b></div>
</td>
</tr>
<tr>
<td>
<textarea id="notes" rows="3" cols="25" runat="server"
NAME="notes"></textarea>
</td>
</tr>
</table>
I tried to stick the javascript below into the page_load event, but it's
just not working. :( Any clues? Am I on the right track? Thanks!
CheckBoxList1.Attributes.Add("onclick", "javascript:form1.notes.value =
'this is a test'")
Bruce Barker - 15 Sep 2005 17:07 GMT
yes and no. the checkboxlist, while a single control on the server,
generates individual checkbox controls in the browser. look at the rendered
html to see how this works. the add attribute is proably being applied to he
<span>. you should switch to html controls if you want to use client script.
-- bruce (sqlwork.com)
> The title is self-explanatory, but I'll show you all what I've done thus
> far.
[quoted text clipped - 33 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***