I have tried to get it to work but I simply can't find the mistake. Also I have no idea how to make the selection which you have not selected to turn red or some color to alert you.
<!DOCTYPE html>
<html>
<body>
<select id='Selection' name='Selection'>
<option value=''>Select</option>
<option value='1'>user1</option>
<option value='2'>user2</option>
<option value='3'>user3</option>
</select>
<br>
<select id='Candidate' name='Candidate'>
<option value=''>Select</option>
<option value='1'>candidate1</option>
<option value='2'>candidate2</option>
<option value='3'>candidate3</option>
</select>
<br>
<input type='button' onclick='Validate()' value='select' />
<script>
function Validate()
{
if(document.getElementById('Selection').value == '' ||
document.getElementById('Candidate').value == '' ||)
{
alert('Please complete all selections');
return false;
}
return true;
}
</script>
</body>
</html>
||operators in your edit, you still need the first one.