title: Stop making form to reload a page
body: <p>I need help!</p>
  
  <p>I need that, after the user submits the form below, the email is validated, an alert is displayed and changes a part of the screen with the message "Welcome + email" for at least 5sec.</p>
  
  <pre><code>&lt;form name="formcontact1" action="#"&gt;
      &lt;input type='text' name='email' size="36" placeholder="Your e-mail :)"/&gt;
      &lt;input type="submit" name="submit" value="SUBMIT" onclick="ValidateEmail(document.formcontact1.email)" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I have the following script to validate email that is working perfect!</p>
  
  <pre><code>function ValidateEmail(inputText) {
  
    var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
    if (inputText.value.match(mailformat)) {
      alert("Email " + inputText.value + " has been sent");
      document.getElementById('title1').innerHTML = 'Welcome ' + inputText.value;
      return true;
  
    }
    else {
      alert("Invalid Email");
      document.formcontact1.email.focus();
      return false;
    }
  
  }
  </code></pre>
  
  <p>After the button is clicked it shows the alert message "EMAIL xxx HAS BEEN SENT" (correct). </p>
  
  <p>I need that it update part of the page with a message "WELCOME xxxxx". </p>
  
  <p>The problem is after the alert message be shown. It update part of the page but reload. Is there a way to avoid this and keep 5 seconds before reload?.  THANKS !!!</p>