Skip to content

Instantly share code, notes, and snippets.

Created June 7, 2011 21:19
Show Gist options
  • Save anonymous/1013193 to your computer and use it in GitHub Desktop.
Save anonymous/1013193 to your computer and use it in GitHub Desktop.
<script language=javascript type='text/javascript'>
function checkAll(chkname)
{
if(document.form1['chkname'].checked == true) {
alert(chkname);
}
</script>
Input with
<input type='checkbox' name='checkbox' onClick='checkAll(this.name)'>
throws error
document.form1.chkname is undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment