krugos
07-10-2003, 06:58 AM
Hi I have the following HTML code:
<table name="bob">
<tr>
<td onclick="toggle(this,"checkboxname")>
Click here...
</td>
<td>
<input type="checkbox" name="checkboxname">
</td>
</tr>
</table>
and in my toggle (javascript function): I need to work out if the checkbox is checked, something like this...
if (this.parent.checkboxname.checked)
how do I do this? Basically I need to know how to find the parent of the object...
Regards,
Matt.
<table name="bob">
<tr>
<td onclick="toggle(this,"checkboxname")>
Click here...
</td>
<td>
<input type="checkbox" name="checkboxname">
</td>
</tr>
</table>
and in my toggle (javascript function): I need to work out if the checkbox is checked, something like this...
if (this.parent.checkboxname.checked)
how do I do this? Basically I need to know how to find the parent of the object...
Regards,
Matt.