I am working a new project. My Project Process showing here::
1. At first Create a doctype with fields and button
2. after clicking the button there show some row( comes from database ). And every row have a delete button.
2. Add an jquery onclick event for this delete button
3. When click delete button send a ajax HTTP API request for delete this. URL : (
http://0.0.0.0:8000/api/resource/Visit/V-140805000001)
There is my codes for delete a row by sending HTTP API.
$('html').on('click', '.deleteSlotRow', function(){
var DelID = $(this).attr('data-deletevalue');
$.ajax({
type:"DELETE",
url: 'api/resource/Patient Visit/'+DelID,
statusCode: {
200: function(data) {
console.log(data);
msgprint(__("Delete Successful"));
}
}
})
});
After sending HTTP request it will return "500 INTERNAL SERVER ERROR".
I am following HTTP API suggestion but it's not working. How to solve this .....
You Will find a attach file for check my page design .... :)