juery

  1. /**
  2.  * @author dereine
  3.  */
  4. $(document).ready(function() {
  5.         $('form#contact-mail-page').submit(function () {               
  6.                 if ($('form#contact-mail-page input#edit-name').val() == "") {
  7.                         alert('Das Feld Name ist noch nicht ausgefüllt');
  8.                         return false;
  9.                 }
  10.                 else if ($('form#contact-mail-page input#edit-subject').val() == "") {
  11.       alert('Das Feld Betreff ist noch nicht ausgefüllt');
  12.                         return false;
  13.     }
  14.                 else if ($('form#contact-mail-page input#edit-mail').val() == "") {
  15.       alert('Das Feld Email ist noch nicht ausgefüllt');
  16.                         return false;
  17.     }
  18.                 else if ($('form#contact-mail-page textarea#edit-message').val() == "") {
  19.       alert('Das Feld Nachricht ist noch nicht ausgefüllt');
  20.       return false;
  21.                 }
  22.                 else {
  23.                         return true;
  24.                 }
  25.                
  26.         });
  27. });
  28.