Add another attempt with python
This commit is contained in:
10
python_flask/app.js
Normal file
10
python_flask/app.js
Normal file
@@ -0,0 +1,10 @@
|
||||
document.body.addEventListener('htmx:responseError', function(evt) {
|
||||
console.log(evt.detail);
|
||||
let detail = evt.detail;
|
||||
let responsecode = detail.xhr.status;
|
||||
if (responsecode == 400 && detail.requestConfig.path === "/list/") {
|
||||
alert(detail.xhr.response)
|
||||
console.log(evt.detail.xhr.repsonse);
|
||||
}
|
||||
});
|
||||
console.log("Added event listener");
|
||||
Reference in New Issue
Block a user