This is what I'm assuming you want:
function validate()
{
var t = document.getElementByID( "myTextbox" );
var c1 = document.getElementByID( "myCheckbox1" );
var c2 = document.getElementByID( "myCheckbox2" );
if( t.value != "" )
{
if( !(c1.checked || c2.checked) )
{
alert( "You didn't do what I wanted you to do. Bad user!" );
return( false );
}
}
return( true );
}
and
<form method=post action=blah onsubmit="JavaScript: return( validate() );">
<input type=text id=myTextbox name=blah><br>
<input type=checkbox id=myCheckBox1 name=blah><br>
<input type=checkbox id=myCheckBox2 name=blah><br>
<input type=submit>
</form>