From 956da690433e87995c82e7ffcd34b5172f353b84 Mon Sep 17 00:00:00 2001 From: Trygve Date: Tue, 5 Nov 2024 12:51:55 +0100 Subject: [PATCH] Fiksa bugs --- registrering.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/registrering.php b/registrering.php index c3fd638..20b5862 100644 --- a/registrering.php +++ b/registrering.php @@ -47,7 +47,7 @@ - +
@@ -67,7 +67,7 @@ function get_control() { function register_runner(id) { control = get_control(); if (control == 0) { - console.error(error); + console.error("Ingen post valgt"); alert("Velg en post!"); return 0; } @@ -84,11 +84,10 @@ function register_runner(id) { .then(response => { if (response.status == 401) { alert("Feil passord!") - } - }) - - update() - document.getElementById("search").focus() + }}) + .then((response) => update()); + document.getElementById("search").focus(); + }; function update() { @@ -99,7 +98,6 @@ function update() { fetch(request) .then((response) => response.text()) .then((text) => {table.innerHTML = text;}) - filterTable() }