title: Check if multiple functions are true, then do something
body: <p>I am stuck on what I thought was a simple PEBCAK error on my part. I am trying to verify all of my functions are true before I submit a form, but cannot figure for the life of me what is wrong. Below is my javascript code:</p>
  
  <pre><code>function checknewaccount(){
  if(emailvalid()&amp;&amp; checkname() &amp;&amp; passwordcheck())
  {
      return true;
  }
  else{
      return false;
  }
  }
  
  
  function emailvalid()
  {
        if(email condition)
        {
            return true;
        }
        else {
            return false;
        }
  }
  
  function checkname())
  {
        if(name condition)
        {
            return true;
        }
        else {
            return false;
        }
  }
  
  function passwordcheck(){
        if(password condition)
        {
            return true;
        }
        else {
            return false;
        }
  }
  </code></pre>
  
  <p>html below:</p>
  
  <pre><code>&lt;form  id="newaccount" name="newaccount" method="post"  onSubmit="accountcode.php"&gt;
  &lt;input type="text" id="email" onBlur="emailvalid()"/&gt;
  &lt;input type="text" id="username" onBlur="checkname()" /&gt;
  &lt;input type="password" id="password"  onkeyup="passwordcheck()"/&gt;
  &lt;input type="submit" value="New" onClick="return checknewaccount()"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>When i click "New, nothing happens, and I know the accountcode.php is not running, because nothing happens on the database end and there are no errors reported.</p>
  
  <p>To sum up, my question is how checknewaccount() does not work? Does it have something to do with how I am calling them?</p>
  
  <p>I am new to javascript so if I am completely off on my implementation, I apologize. Thank you very much for the help!</p>