Storing form action URLs in a checkbox's value and making an AJAX request using that URL results in an inexplicable failure So, I have a Flask app. Right now, I'm trying to make a column of checkboxes on an HTML table. When you click the "delete selected" button, it'll delete the entries by doing this:
Iterate through the table and get all checked checkboxes.
The value of the checkbox is the URL to make a request to delete that row.
I make an AJAX request with the URL taken from the value of that checkbox. The URL is in a format like /item_type/id where id is a number. The type of the AJAX request is DELETE. So for each checked check box, I make a DELETE request to that URL.
Though, it simply fails when I make these requests. I don't know how to get the status code from the HTTP request. My app's logs aren't showing any 3xx, 4xx, or 5xx errors related to that URL.
However, if I have an alert before the first request, then they will succeed. Though, if I have only a single row checked, that single request will fail.

After looking at the network tab, none of the requests complete because I reload the page immediately after making the request. Making the page reload after the request completed now succeeds.