View Single Post
Old 01-16-2013, 07:27 PM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
well , since something else on the page is affecting this code, you ned to show more.

also what syntax is this : data: {joodb field|id} ?
I dont see where your getting the id of the item to delete and assigning it to the ajax call. also why add a script block to every delete button you generate?

you could jsut use soemthing like

Code:
 $('.deleterow').click(function (e) {
e.preventDefault();//prevent default click action for the anchor
 $.ajax({
    type: 'post',
    url: "http://www.{WEBSITEDOMAIN}.co.uk/delete.php",
    data: {'id':codetogetid_here},
  });
})
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is online now   Reply With Quote