anderzreevez
Programmer
Hi,
I cannot work out how to validate the checkbox array 'leadcontacts[]' as having any of its array elements containing a check?
Basically there is an ID associated with an array of checkboxes all named leadcontacts[]. However standard javascript validations such as that below cannot accept checkbox ARRAYS?
Any ideas?
Anders
Example function:
<script language="JavaScript">
<!--
function validate_form ( )
{
if ( document.form1.leadcontacts[].checked == false )
{
alert ( "Please select at least one contact to assign to this lead." );
valid = false;
}
}
//-->
</script>
I cannot work out how to validate the checkbox array 'leadcontacts[]' as having any of its array elements containing a check?
Basically there is an ID associated with an array of checkboxes all named leadcontacts[]. However standard javascript validations such as that below cannot accept checkbox ARRAYS?
Any ideas?
Anders
Example function:
<script language="JavaScript">
<!--
function validate_form ( )
{
if ( document.form1.leadcontacts[].checked == false )
{
alert ( "Please select at least one contact to assign to this lead." );
valid = false;
}
}
//-->
</script>