<head> <script> function checkit(){ document.getElementById("test").checked=true } </script> </head> <body> <form id="form1" name="form1" method="post" action=""> <input type="text" name="textfield" onclick="checkit()"/> <input name="test" type="checkbox" id="test" value="checkbox"/> </form>
<script type="text/javascript"> function checkThisRow(txt) { txt.parentNode.parentNode.cells[0].childNodes[0].checked = true; } </script> <table> <tr> <td><input type="checkbox" name="chk" /></td> <td><input type="text" name="txt" onclick="JavaScript: checkThisRow(this);" /></td> </tr> <tr> <td><input type="checkbox" name="chk" /></td> <td><input type="text" name="txt" onclick="JavaScript: checkThisRow(this);" /></td> </tr> <tr> <td><input type="checkbox" name="chk" /></td> <td><input type="text" name="txt" onclick="JavaScript: checkThisRow(this);" /></td> </tr> <tr> <td><input type="checkbox" name="chk" /></td> <td><input type="text" name="txt" onclick="JavaScript: checkThisRow(this);" /></td> </tr> <tr> <td><input type="checkbox" name="chk" /></td> <td><input type="text" name="txt" onclick="JavaScript: checkThisRow(this);" /></td> </tr> </table>
<script type="text/javascript"> function checkThisRow(txt) { txt.parentNode.parentNode.cells[0].childNodes[0].checked = true; } </script> <form method="post" name="form1"> <table> <% If Not db1.EOF Then While ((Repeat1__numRows<>0) AND (NOT db1.EOF)) %> <tr> <td align="center"><input name="ab" type="checkbox" value="<%=db1("G_id")%>" /></td> <td align="center"> <input name="G_Total" type="text" value="<%=db1("G_Total")%>" size="4" onclick="JavaScript: checkThisRow(this);" /> </td> </tr> <% Repeat1__index = Repeat1__index+1 Repeat1__numRows = Repeat1__numRows-1 db1.MoveNext Wend End If %> </table> </form>