how to turn checkbox.checked = true
Posted: Mon Mar 15, 2004 10:58 pm
The function i want is when i change the select box, the checkbox will checked. But javascript syntax error. anyone can guide me ... ?
i use name = "editbox[]" b'cos i use foreach().
<input name="editbox[]" type="checkbox">
Below is the Source
i use name = "editbox[]" b'cos i use foreach().
<input name="editbox[]" type="checkbox">
Below is the Source
Code: Select all
<script language="JavaScript">
function tickIt(form)
{
document.formsї0].editboxї].checked = true ;
}
</script>
while loop {
<select name="select" onChange ="tickIn(this.form)">
<option value="1" >H</option>
<option value="2" >A</option>
</select>
<input name="editboxї]" type="checkbox" id="editbox" value="<? echo $row_mat_id ?>">
}