On clicking submit i have to run a JS functio to see if all fields are filled in, well if there not i give a message box etc but the form still posts am using,


HTML Code:
<form method="POST" action="verify.php">
  <input type="submit" value="Register" name="B1" onclick="checkfields()">
</form>

<script language = "javascript">

function checkfields(){

}

</script>
I need it not to post if any of the fields are empty