diff --git a/setup_microscope.html b/setup_microscope.html
index 5fa1730..319f8aa 100644
--- a/setup_microscope.html
+++ b/setup_microscope.html
@@ -6,36 +6,46 @@
@@ -59,30 +69,18 @@
Toggle camera
-
-
- put an object of known length and width under the microscope.
- enter width and height of measured object
-
-
@@ -190,8 +188,11 @@
db = openRequest.result;
// continue working with database using db object
};
- function add(e){
- e.preventDefault();
+
+ const form = document.getElementById("microscope_setup");
+ form.addEventListener("submit", add);
+
+ function add(event){
let microscope_setup = {
"name" : document.getElementById("name").value,
"FoV_Height" : document.getElementById("FoV_height").value,
@@ -210,13 +211,13 @@
console.log("something went wrong");
// Don't forget to handle errors!
};
+ event.preventDefault();
+
}