From 02641690979a741dbf2cc24c5037ac1d26c5a980 Mon Sep 17 00:00:00 2001
From: Farhan Sheth <101197900+Phantom-fs@users.noreply.github.com>
Date: Fri, 19 Apr 2024 23:46:01 +0530
Subject: [PATCH] web update v1.5

---
 js/record.js | 3 ++-
 js/script.js | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/js/record.js b/js/record.js
index f46d957..4850b91 100644
--- a/js/record.js
+++ b/js/record.js
@@ -384,7 +384,8 @@ function submitRecording() {
       body: formData,
       headers: {
         'Content-Type': 'multipart/form-data'
-      }
+      },
+      mode: 'cors'
   })
   .then(response => response.json())
   .then(data => {
diff --git a/js/script.js b/js/script.js
index ad27cd7..01aa605 100644
--- a/js/script.js
+++ b/js/script.js
@@ -1,7 +1,8 @@
 document.getElementById("loginForm").addEventListener("submit", function(event) {
     event.preventDefault(); // Prevent form submission
 
-    var name = document.getElementById("name").value.trim();
+    var nameR = document.getElementById("name").value;
+    var name = nameR.trim();
     var reg = document.getElementById("reg").value;
     var email = document.getElementById("email").value;
     var phone = document.getElementById("phone").value;