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.
Thanks for the input. This morning, the same code is working. My computer has been closed down and started up again since I posted the question so maybe there was an issue that was fixed that way or maybe javascript caching (I changed the script several times). In any case, all is working OK now. Pete