Try this : -

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Check Form Client Side</title>
<script language="JavaScript" type="text/javascript">
<!--
function checkForm(form){
for (var i = 0; i < form.elements.length; i++) {
var objectID = form.elements[i];
if (objectID.type == 'text' || objectID.type == 'textarea' || objectID.type == 'password' || objectID.type == 'file' ) {
if (objectID.value == '') {
alert('Please fill out the text field ' + objectID.name);
objectID.focus();
return false;
}
}
}
}
//-->
</script>

</head>
<body>
<form name="form1" method="POST" action="process.asp" onsubmit="return checkForm(this)">
<input type="text" name="sometext">
<input type="password" name="somemoretext">
<input type="submit" value="Go!">
</form>
</body>
</html>

It checks the form to see if the text boxes contain text and if it returns false it wont let you continue.