This is on a shoutbox, each shout have a delete link where and admin can delete the shout.
Its a link with
onclick =\"deleteShout()\" in it.
The function is this.
Code:
function deleteShout(e){
e.preventDefault();
var ID2 = $(this).attr("href");
$.ajax({
type: "POST",
url: "_aGadminCp/modules/editShoutbox.php",
data: "ID="+ID2,
success: function(msg){
popUp(msg);
}
});
}
Is it running multiple times before more than one link has the function on it? If so how could i stop it doing that?
EDIT: I changed the wrong part of my code, now when i click the link i get e is not defined and the link goes to the number in the href, how can i stop that happening?