Skip to content
Snippets Groups Projects
Commit c1d1eda7 authored by GHALLAB Houda's avatar GHALLAB Houda
Browse files

test

parent c8fc2d2e
Branches
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
const controls = document.getElementById("camera-feed");
// for next previous initial final buttons
document.addEventListener("DOMContentLoaded", function () {
var buttons = document.querySelectorAll('.btn-petit');
......@@ -23,4 +24,45 @@ document.addEventListener("DOMContentLoaded", function () {
xhr.send(formData);
});
});
});
\ No newline at end of file
});
// for undo button
document.addEventListener("DOMContentLoaded", function () {
var undoButton = document.getElementById('undo-button');
undoButton.addEventListener('click', function () {
var undoForm = document.getElementById('undo-form');
var formData = new FormData(undoForm);
var xhr = new XMLHttpRequest();
xhr.open('POST', '/undo', true);
xhr.onload = function () {
// Handle the response if needed
console.log(xhr.responseText);
};
xhr.send(formData);
});
});
// change position
document.addEventListener("DOMContentLoaded", function () {
var changePlaceButton = document.getElementById('change-place-button');
changePlaceButton.addEventListener('click', function () {
var changePlaceForm = document.getElementById('change');
var formData = new FormData(changePlaceForm);
var xhr = new XMLHttpRequest();
xhr.open('POST', '/change_place', true);
xhr.onload = function () {
// Handle the response if needed
console.log(xhr.responseText);
};
xhr.send(formData);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment