JQuery: When user clicks on a link, first submit a form then goto link
<p>SO I have a setup with a few links as follows</p>

<pre><code>&lt;a class="someclass" href="http://www.google.com" id="link01"&gt;Google&lt;/a&gt;
&lt;a class="someclass" href="http://www.yahoo.com" id="link02"&gt;Yahoo&lt;/a&gt;
&lt;a class="someclass" href="http://www.cnn.com" id="link03"&gt;CNN&lt;/a&gt;
&lt;a class="someclass" href="http://www.facebook.com" id="link04"&gt;Facebook&lt;/a&gt;

$(".someclass").click(function() {
            var currentId = $(this).attr('id');
            var data = "do=clearthis&amp;id=" + currentId;

              $.ajax({
                 type: "POST",
                  url: "clearance.php",
                  data: data,
                  success: function(msg){
                   }
                 });
               });
});
</code></pre>

<p>What I am doing is tking the link that is clicked, obtaining an id value from the link and ajax submitting that to my PHP file which will remove the link from my database.</p>

<p>So that when a user clicks on a link, that link is removed from my database.  However, the problem is that its not actually working.  I htink the problem is that its too fast, as jquery begins to POST that form for me, its already jumping to the target link.  Is there any way to induce some kind of delay to allow my clearance.php to process the removal before allowing the user to continue to the target link?</p>

<p>THanks!</p>
