title: wait to leave page until ajax is done
body: <p>Basically, I am sending a <code>$.POST()</code> when an  element is clicked. this element brings the user to a different page, and the POST request is not going all the way through. If i step through it slowly the script gets ran, however.</p>
  
  <p>How can i make the page wait until the script has run until it navigates away from the page? or is there a different issue here? Sort of new to AJAX</p>
  
  <pre><code>$('.ad-link').on('click', function() {
      $.get('http://easyuniv.com/php/clickPP.php?id='+$(this).attr('id'));
  });
  </code></pre>
  
  <p>and then clickPP.php is just a simple SQL query that i have verified to work.</p>
  
  <p>Thanks</p>