Basically, I am sending a $.POST() 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.
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
$('.ad-link').on('click', function() {
$.get('http://easyuniv.com/php/clickPP.php?id='+$(this).attr('id'));
});
and then clickPP.php is just a simple SQL query that i have verified to work.
Thanks
You can use a callback for this, like so: