Put the following at the end of the "click" function: return false;
This tells the browser that it should not "do what it normally does" when a link it clicked (it works for other events too). Karl Rudd On Thu, Sep 25, 2008 at 6:04 AM, cnu <[EMAIL PROTECTED]> wrote: > > Hi, > I have an anchor tag like <a href="/foo" class="delete" id="1">delete</ > a> > I have attached a click event to the tag which does a POST request to > the url by doing > > $("a.delete").click(function () { > $.post(url, {"id":id}, function(data){ > console.log(data.msg); > }); > }); > > The POST request goes throught, but after that - a GET request goes to > the server because of the link click. > > Is there any way to solve this? Is this the right way to do it? >