My code for this is below:
Question:
I have a form button...onclick it does function validate...
if agree1 and question 1 are empty it should alert the message...
else it should do check.
However, during my testing it's not doing the alert if these strings
are empty.

Are my empty strings correct?

=====================================

<script language="javascript">

function validate(){

//Declare Variables
agree1 = document.form.agree1.checked;
agree2 = document.form.agree2.checked;
agree3 = document.form.agree3.checked;
agree4 = document.form.agree4.checked;
question1 = document.form.question1.checked;

if((agree1 == ' ') && (question1 == ' '))
{
alert("sucks");
}
else
{
check();
}
}


function check(){

//Declare Variables
agree1 = document.form.agree1.checked;
agree2 = document.form.agree2.checked;
agree3 = document.form.agree3.checked;
agree4 = document.form.agree4.checked;

if((agree1==true) && (agree2==true) && (agree3==true) && (agree4==true))
{
window.document.location.href = "index_return.htm";
}
else
{
window.document.location.href="x/x.htm";
}

}


</script>