title: Ajax code is not working and returns Object Object
body: <p>I have a pop-up form for registration on my site. And, I want to verify the email is not already in use prior to submitting. I am using "on submit" within there form to call validateForm. The call to validateForm works. IT even works when I don't have my Ajax call in the function. However, when I add my Ajax call, the Ajax continues to not work. It goes straight to error:  and I get Object Object. What is wrong with my Ajax portion that would keep it from working?  Could it be some setting on my host? </p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt; &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      function validateForm()
      {
          var email = document.forms["signupform"]["email"].value;
          if (email == "")
          {
              return false;
          }
          else
          {
              $.ajax({
                  type: "POST",
                  url: "/CheckEmail2.php",
                  data: {User_Email:email},
                  dataType: "text",
                  success: function(resp)
                  {
                      if (respects == "Found")
                      {
                          return false;
                      }
                      else
                      {
                          return true;
                      }
                  },
                  error: function(data){
                      alert(data);
  
                  }
              }); //end Ajax
          }
  
      }
  &lt;/script&gt;
  </code></pre>