When you execute this statement: window.location.href = 'test.php?delnews=' + this.id;
you are navigating the browser to a new page. This terminates any JavaScript on the current page, and your DELETED alert will not be displayed. It sounds like you want to remain on the same page, so you should be using an Ajax call instead of navigating to a new page. Also, deleting a row with a simple GET is dangerous. What if a search engine crawler or a browser pre-fetcher happens to do a GET on that URL? It should probably be a POST instead. -Mike > From: james182 > > i need to delete a row from mysql DB, click delete buttonn > and fadeout then delete record from DB. > HELP PLEASE ... > > Below is my code: > > $(document).ready(function() { > $("a.delete").click(function() { > if (confirm('Are you sure you want to > delete ? - ' + this.id)) { > $(this).parent().fadeOut(1000, > function() { > $(this).parent('tr').remove(); > //delete(this.id); > window.location.href = > 'test.php?delnews=' + this.id; > alert('DELETED'); > }); > } > }); > }); > -- > View this message in context: > http://www.nabble.com/Confirm-Deletion-tp20869801s27240p20869801.html > Sent from the jQuery General Discussion mailing list archive > at Nabble.com. >