Skip to content
Snippets Groups Projects
Commit c8fc2d2e authored by Ezzakri Anas's avatar Ezzakri Anas
Browse files

update

parents 6b68ebc1 f987e6c1
No related branches found
No related tags found
No related merge requests found
"use strict";
\ No newline at end of file
"use strict";
const controls = document.getElementById("camera-feed");
document.addEventListener("DOMContentLoaded", function () {
var buttons = document.querySelectorAll('.btn-petit');
buttons.forEach(function (button) {
button.addEventListener('click', function () {
var form = document.getElementById('move');
var formData = new FormData(form);
formData.append('psw2', button.value);
var xhr = new XMLHttpRequest();
xhr.open('POST', '/game', true);
xhr.onload = function () {
// Handle the response if needed
console.log(xhr.responseText);
};
xhr.send(formData);
});
});
});
\ No newline at end of file
......@@ -7,6 +7,7 @@
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
<script src="static/game_manager.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Partie en cours</title>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment