I searched for this problem but the answers I found haven't worked for me. Here is my js script.
$("#edit-btn").click(function() {
$.ajax({
method: "POST",
url: $(this).data("url"),
data: { "UserID" : $(this).data("id") },
success: function(data, textStatus, jqXHR){
alert(textStatus);
},
error: function(jqXHR, textStatus, errorThrown){
alert(textStatus);
}
})
})
When this code is executed, I get "The requested URL /user_update.php4 was not found on this server." in my browser. "user_update.php" is the value of $(this).data("url") and "4" is the value of $(this).data("id").
Any help most welcome.