// ------------------------------------------------------------------ // NAME: contact_e.js // AUTHOR: Spacsoft / spc // DATE: 30.08.2003 // VERSION: 1.0 // FUNCTION: Check that all required fields are not empty // ------------------------------------------------------------------ //check if required fields in contact form are empty //TRUE => ok, FALSE => not ok function checkFields() { //variables with messages var msgEmail = new String("Please fill out the field 'Email' !"); var msgMeldung = new String("Please fill out the field 'Message' !"); //check all required fields //..field Email if (document.formContact.Email.value == '') { alert(msgEmail); return false; } //..field Meldung if (document.formContact.Meldung.value == '') { alert(msgMeldung); return false; } else return true; }