set checkbox

Giganews Newsgroups
Subject: set checkbox
Posted by:  Ben Dover - Mental Patient 0057 (Ben_Dov…
Date: Tue, 02 Sep 2003

i'm having trouble setting a checkbox to checked and unchecked

I want to have a form where you click a button. onclick would call a
function that
checks a checkbox on the form.

in the head:
function clearItem(thisOne){
  var fset = document.getElementById(thisOne);
  var inputs = fset.getElementsByTagName("input");
  for (var i = 0; i<inputs.length; i++)

in the body:
  <form action="" method="POST" name="up_data">

<input type="button" name="xxclrField_fnct1" value="clear"
<input type="checkbox" name="att3">

<fieldset id="clrField_fnct1">
    <input type="text" size=30 name="stu1" value="">
    <input type="text" size=30 name="frm1" value="">