Empereur-Pirate commited on
Commit
e2cd1f2
·
verified ·
1 Parent(s): 1e416e3

Update static/script.js

Browse files
Files changed (1) hide show
  1. static/script.js +3 -3
static/script.js CHANGED
@@ -26,11 +26,11 @@ const generateText = async (text) => {
26
  return data.output;
27
  };
28
 
29
- textGenForm.addEventListener("submit", async (event) => {
30
  event.preventDefault();
31
- console.log("Form submitted"); // Add this line
32
  const textGenInput = document.getElementById("text-gen-input");
33
  const textGenParagraph = document.querySelector(".text-gen-output");
34
 
35
  textGenParagraph.textContent = await generateText(textGenInput.value);
36
- });
 
26
  return data.output;
27
  };
28
 
29
+ function handleFormSubmit(event) {
30
  event.preventDefault();
31
+ console.log("Form submitted");
32
  const textGenInput = document.getElementById("text-gen-input");
33
  const textGenParagraph = document.querySelector(".text-gen-output");
34
 
35
  textGenParagraph.textContent = await generateText(textGenInput.value);
36
+ }