I'm encountering a very weird problem, first here's my code :
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
</head>
<body>
<a href="#" onclick="supprimerMembre('1')">Supprimer</a>
<script>
function supprimerMembre(id) {
$.post({
url: 'whateverlink.com',
data: 'id='+id,
success: function(data) {
}
});
}
</script>
</body>
</html>
So if I open the page and click the link "supprimer" everything works great, but once I modify manually the id passed to "supprimerMembre" some real weird thing happens, the request is sent twice once with the new id and another with the old id, and if I modify again, their will be three requests ! and so on (as many time I modify the id as many requests are sent) any one can help me please, this this is driving me crazy!