This is partial markup:
<tr class="Comment">
<td class="CommentCheck">
<input id="ctl00_col2_rptComments_ctl01_chkBox" type="checkbox" name="ctl00$col2$rptComments$ctl01$chkBox" />
<input type="hidden" name="ctl00$col2$rptComments$ctl01$hdnFldItemID" id="ctl00_col2_rptComments_ctl01_hdnFldItemID" value="35" />
</td>
<td class="CommentBy" >
<span id="ctl00_col2_rptComments_ctl01_lblUserName" title="Posted by name">Jack</span>
<tr>
<td colspan="100%" class="BodyComment">
<div id="ctl00_col2_rptComments_ctl01_TheTable" style="padding: 0 0 0 40px;display:none;">
<span id="ctl00_col2_rptComments_ctl01_TextBox1" style="display:inline-block;width:75%; border: thin solid #000000;padding: 4px 4px 4px 4px;">I know it all now!</span>
</div>
</td>
</tr>
</tr>
On the page there are many rows like that, I want to find all rows where chkBox is marked, and unhide/hide the div with cleintId='TheTable'..
This is part of my javascript function:
function SelectClick() {
var TargetBaseControl = document.getElementById("commentsTable");
var Inputs = TargetBaseControl.getElementsByTagName('input');
for (var n = 0; n < Inputs.length; ++n)
if (Inputs[n].type == 'checkbox' && Inputs[n].id.indexOf('chkBox', 0) >= 0)
{
How to locate the div with clientId 'TheTable'?