I have a table which is filled from a database. The user can delete one row by clicking the delete button next to it. After the click the row fades away. This works on my localhost but on the live server I get a 500 Internal server error.
The strange thing is, there is a pretty much similar function tied to another element and that works fine. I simply copied the original one that was not written by me. I just wonder why on the live server the original works and my identical code does not.
Here is the my code:
$K2('.deleteNakladyButton').click(function(event){
event.preventDefault();
if (confirm(K2Language[3])) {
var element = $K2(this).parent().parent();
var url = $K2(this).attr('href');
$K2.ajax({
url: url,
type: 'get',
success: function(){
$K2(element).fadeOut('fast', function(){
$K2(element).remove();
});
}
});
}
});
The original is different in the name of the class that it is triggered by. The original says .deleteAttachmentsButton.
This function is not crucial to the site but it would add a little bit more comfort for my client.
Thank you for your answers.
It seems to me that there are (at least) 2 possible reasons for this. As said before, 500 internal server error indicates that the call to the server succeed, but the server didn’t know how to handle the request.