I was wondering if anyone has encountered this error. When I have more than 1 checkboxes displayed and I try to get its length, I get the number of checkboxes; but if only one checkbox is on the page, I get an "undefined" for the value of length... any help is greatly appreciated!
<html>
<head>
<script>
function showAlert()
{
alert (frm1.chkbox.length)
}
</script>
</head>
<body onload="showAlert()">
<form name=frm1>
<input type=checkbox name=chkbox>
<!--
<input type=checkbox name=chkbox>
-->
</form>
</body>
</html>
<html>
<head>
<script>
function showAlert()
{
alert (frm1.chkbox.length)
}
</script>
</head>
<body onload="showAlert()">
<form name=frm1>
<input type=checkbox name=chkbox>
<!--
<input type=checkbox name=chkbox>
-->
</form>
</body>
</html>