darkmunk
Oct 20th 2007, 4:50 am
I am trying to put the value of a checkbox into a text field or remove it if it is unchecked, the code below is heavily commented because I am trying to work down thru it to find the error - object doesn't support this method or property.
<input name="CD" type="checkbox" id="CD" value="CD" onMouseUp="keyPoints('CD')">
<input name="CC" type="checkbox" id="CC" value="CC">
<input name="L" type="checkbox" id="L" value="L">
<input name="AC" type="checkbox" id="AC" value="AC">
<input name="keyPoints" type="text" value="">
<script language="JavaScript" type="text/JavaScript">
function keyPoints(thisCheckbox){
alert(thisCheckbox);
//str = document.frmSend.keyPoints.value;
//alert(str);
//if (str(indexOf(thisCheckbox))<0){
//alert("enpty");
//str = str + thisCheckbox;
//}
}
</script>
Any thoughts?
<input name="CD" type="checkbox" id="CD" value="CD" onMouseUp="keyPoints('CD')">
<input name="CC" type="checkbox" id="CC" value="CC">
<input name="L" type="checkbox" id="L" value="L">
<input name="AC" type="checkbox" id="AC" value="AC">
<input name="keyPoints" type="text" value="">
<script language="JavaScript" type="text/JavaScript">
function keyPoints(thisCheckbox){
alert(thisCheckbox);
//str = document.frmSend.keyPoints.value;
//alert(str);
//if (str(indexOf(thisCheckbox))<0){
//alert("enpty");
//str = str + thisCheckbox;
//}
}
</script>
Any thoughts?