Added loading indicator to js.

This commit is contained in:
Andrew Lalis 2023-07-16 12:34:13 -04:00
parent df8a6dd192
commit 3d194eb2a0
1 changed files with 1 additions and 3 deletions

View File

@ -2,10 +2,8 @@ const form = document.getElementById("schematic-form");
const resultContainer = document.getElementById("result-container");
form.onsubmit = async (e) => {
e.preventDefault();
resultContainer.innerHTML = "";
console.log(e);
resultContainer.innerHTML = "<p>Uploading and extracting contents...</p>";
const data = new FormData(form);
console.log(data);
try {
const response = await fetch("/extracts", {
method: "POST",