Hi thanks for your reply ...But what is the main reason causing this to happen? Anyway in my code, the "java" and "script" are not separated.I found out a solution to solve the problem as shown below.
function ValidateRequired(field, alerttxt) { with(field) { if (value== null || value==""){ alert(alerttxt) return false; } else{ return true; } } } function ValidateAge(field, alerttxt) { with(field) { if(value==0) {alert(alerttxt) return false;} else{return true;} } } function validate_form(thisform){ with (thisform){ if(ValidateRequired(name, "Name field