title: HTML form gives a SEND error Uncaught ReferenceError: send is not defined at HTMLInputElement.onclick
body: <p>Hello I have this error I cannot find why is giving me. any ideas how to fix this? thank you all!</p>
  <blockquote>
  <p>form.html:34 Uncaught ReferenceError: send is not defined
  at HTMLInputElement.onclick (form.html:34)
  onclick @ form.html:34</p>
  </blockquote>
  <pre><code>&lt;script type=&quot;text/javascript&quot; src=&quot;jquery-3.6.0.min.js&quot;&gt;;
      function validate_mail(mail) {
          var filter = /[\w-\.]{1,}@([\w-]{1,}\.)*([\w-]{1,}\.)[\w-]{2,4}/;
          return filter.test(mail)
      }
  
  function send() {
      if (validate_mail($(&quot;#email&quot;).val())) {
          data = {
              'name': $(&quot;#name&quot;).val(),
              'email': $(&quot;#email&quot;).val(),
              'phone': $(&quot;#phone&quot;).val(),
              'cellphone': $(&quot;#cellphone&quot;).val(),
              'message': $(&quot;#message&quot;).val()
          };
          jqxhr = $.ajax({
                  'url': &quot;./sendContact.php&quot;,
                  'type': &quot;POST&quot;,
                  'data': data
              })
              .done(function() {
                  $(&quot;#landingForm&quot;).html(&quot;&lt;span&gt;Success&lt;/span&gt;&quot;);
              });
      }
  } 
  &lt;/script&gt;
  &lt;div id=&quot;landingForm&quot;&gt;
      &lt;div class=&quot;titulo2&quot;&gt;CONTACTO&lt;/div&gt;
    &lt;div&gt;&lt;label&gt;Name:&lt;/label&gt;&lt;input type=&quot;text&quot; id=&quot;name&quot;/&gt;&lt;/div&gt;
    &lt;div&gt;&lt;label&gt;Phone:&lt;/label&gt;&lt;input type=&quot;text&quot; id=&quot;phone&quot;/&gt;&lt;/div&gt;
    &lt;div&gt;&lt;label&gt;Cellphone:&lt;/label&gt;&lt;input type=&quot;text&quot; id=&quot;cellphone&quot;/&gt;&lt;/div&gt;
    &lt;div&gt;&lt;label&gt;Email:&lt;/label&gt;&lt;input type=&quot;text&quot; id=&quot;email&quot;/&gt;&lt;/div&gt;
      &lt;div&gt;&lt;label&gt;Message:&lt;/label&gt;&lt;textarea id=&quot;message&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
      &lt;input type=&quot;button&quot; onclick=&quot;send()&quot; value=&quot;SEND&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>