Added loading indicator to js.
This commit is contained in:
parent
df8a6dd192
commit
3d194eb2a0
|
@ -2,10 +2,8 @@ const form = document.getElementById("schematic-form");
|
||||||
const resultContainer = document.getElementById("result-container");
|
const resultContainer = document.getElementById("result-container");
|
||||||
form.onsubmit = async (e) => {
|
form.onsubmit = async (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
resultContainer.innerHTML = "";
|
resultContainer.innerHTML = "<p>Uploading and extracting contents...</p>";
|
||||||
console.log(e);
|
|
||||||
const data = new FormData(form);
|
const data = new FormData(form);
|
||||||
console.log(data);
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch("/extracts", {
|
const response = await fetch("/extracts", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
Loading…
Reference in New Issue