You can't "fake" URLs. If you could, you could make a link that reads http://www.google.com link pointing to your personal page (or worse). Is it a problem that it's obvious it's a delete request? Isn't that what the user wants?
You should use a form for that, where you can have the ID for deletion in a hidden (or visible) field and provide a nice and clean button for the action. (and you're missing a "return false" in your ajax attempt, without it the link is followed after the click event handler executes) On Jul 30, 8:49 pm, Anoop kumar V <anoopkum...@gmail.com> wrote: > I have a menu, on which is a delete link. The URL of the link is quite > plain:http://mysite.com?delete=true&id=123 > (quite obvious I think that the request is to delete the id=123) > > I wish to hide the destination URL in the browser from the user - so that it > shows a harmless url like:http://mysite.com?#or similar. The reasons are > more aesthetic than anything else. Also the other advantage is once the user > clicks on the link, and then hits on refresh, the request gets posted again > and because the id=123 has already been deleted, it will just generate an > error.. Does that make sense? > > I dont mind using ajax for this - but would love if I could get both options > - ajax and non-ajax. > > Thanks, > Anoop