title: Unexpected token < Ajax
body: <pre><code>Unexpected token &lt; {stack: (...), message: "Unexpected token &lt;"}
  </code></pre>
  
  <p>I would like to call an Ajax function but i got this error instead ...</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function() {
      var interval = setInterval(function(){
          $.ajax({
              url     :'index.php?module=Page&amp;action=Mandats',
              type    : 'post',
              timeout : 3000,
              data    : $(this).serialize(),
              dataType: 'json',
              success : function (data, status, xhr){ 
                  alert(status);
                  },
              error   : function (xhr, status, error){
                  console.log(xhr);
                  console.log(status);
                  console.log(error);
              }
          });
      }, 1000);
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Do you know why that ? </p>