rendered paste body<html>
<head>
<title>Form Validation</title>
<!--dito ilalagay yung script pang check nung form fields-->
<script type="text/javascript">
function validate_form ( )
{
valid = true;
if ( document.contact_form.contact_name.value == "" ) //<-eto chnchek niya kung may laman si field "contact_name"
{
alert ( "Please fill in the 'Your Name' box." );
valid = false;
}
return valid;
}
</script>
</head>
<body>
<form name="contact_form" method="post" action="validate.html" onsubmit="return validate_form ( );">
<h1>Please Enter Your Name</h1>
<p>Your Name: <input type="text" name="contact_name"></p>
<p><input type="submit" name="send" value="Send Details"></p>
</form>
</body>
</html>