title: "function" is not defined error in Javascript: what is the right way to call my function?
body: <p>I understand a bit because of this post: <a href="https://stackoverflow.com/questions/1495903/jquery-settimeout-not-working">JQuery, setTimeout not working</a> why it's not working, but keeping everything this way, what is the right way to call <code>_finalvalidate()</code> inside my div?</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  
  $(document).ready(function(){
  
  //On Submitting
  function _finalvalidate(){
      alert('ppp');
      if(validateName() &amp; validateEmail() &amp; validatePhone()){
          alert('OK');
          return true
      }
      else{
          alert('false');
          return false;
      }
  }
  });
  
  &lt;/script&gt;
  
  
  &lt;div onclick="_finalvalidate();"&gt; Take action &lt;/div&gt;
  </code></pre>