title: i need to start setInterval when i submit a form using onsubmit
body: <p>hi am trying to make setinterval work when i submit a form, </p>
  
  <p>this what i have so far</p>
  
  <pre><code>setInterval(function(){ getUsers(); }, 1000);
  
  
  `document.getElementById("cal").onsubmit = 
  function getUsers()
  {
  $.ajax({
  url: 'test.php',
  type: 'post',
  success: function(data) {
    $('.htmlelement').html(data);
  }
  });
  }'
  </code></pre>
  
  <p>html </p>
  
  <pre><code>&lt;FORM id= "cal" NAME="Calc" action="seller.php" method="post" 
  onsubmit="myFunction()"&gt;
  &lt;input type="text" name="firstname" value="Mickey"&gt;&lt;br&gt;
  &lt;input type="text" name="lastname" value="Mouse"&gt;&lt;br&gt;&lt;br&gt;
  &lt;input type="submit" value="submit"&gt;
  &lt;/FORM&gt;
  </code></pre>