Currently I have this code:
$('#confirm-delete-task-button').click(function() {
$(location).attr('href', '{{ path('tasks_delete', {'id': task.getId()}) }}');
});
So on the button press, the delete page is loaded. The problem with this though is that someone could potentially delete a task simply by typing in the wrong URL, which I don't want to happen.
Is it possible with jQuery, to POST data to that page? I still want it to load on screen so I don't need any ajax or anything... I just want to submit POST data in jQuery.
Any advice welcome, thanks.