I am trying to use javascript to validate text boxes on my form. I am currently using this code:
<script type="text/javascript">
function validate_form (){
var myTextField = document.getElementById('Motor_Temperature');
if(myTextField.value == "")
alert("Please fill in Motor Temperature")
return false;}
else {
return true;
}
</script>
</head>
But i keep getting an error on this line: else {
??????
I want to say if motor_temp is empty then display message and go back to form, otherwise save record.