diff --git a/firmware/html.zip b/firmware/html.zip index 60a5860d..52dfc3f5 100644 Binary files a/firmware/html.zip and b/firmware/html.zip differ diff --git a/sd-card/html/gethost.js b/sd-card/html/gethost.js index 66d5145c..26a5520d 100644 --- a/sd-card/html/gethost.js +++ b/sd-card/html/gethost.js @@ -9,7 +9,7 @@ function getbasepath(){ { // host = "http://192.168.2.219"; // jomjol interner test // host = "http://192.168.178.46"; // jomjol interner test - host = "http://192.168.178.74"; // jomjol interner Real + host = "http://192.168.178.22"; // jomjol interner Real // host = "http://192.168.43.191"; // host = "."; // jomjol interner localhost diff --git a/sd-card/html/index.html b/sd-card/html/index.html index 8064c51f..9416e5c1 100644 --- a/sd-card/html/index.html +++ b/sd-card/html/index.html @@ -79,23 +79,23 @@ li.dropdown {

@@ -113,22 +113,31 @@ li.dropdown { function LoadHostname() { - _basepath = getbasepath(); + _basepath = getbasepath(); - var xhttp = new XMLHttpRequest(); - try { - url = _basepath + '/version?type=Hostname'; - xhttp.open("GET", url, false); - xhttp.send(); - hostname = xhttp.responseText; - document.title = "jomjol - AI on the edge - " + hostname; - document.getElementById("id_title").innerHTML = "Digitizer - AI on the edge - " + hostname; - } - catch (error) - { + var xhttp = new XMLHttpRequest(); + xhttp.addEventListener('load', function(event) { + if (xhttp.status >= 200 && xhttp.status < 300) { + hostname = xhttp.responseText; + document.title = "jomjol - AI on the edge - " + hostname; + document.getElementById("id_title").innerHTML = "Digitizer - AI on the edge - " + hostname; + } else { + console.warn(request.statusText, request.responseText); + } + }); + +// var xhttp = new XMLHttpRequest(); + try { + url = _basepath + '/version?type=Hostname'; + xhttp.open("GET", url, true); + xhttp.send(); + + } + catch (error) + { // alert("Loading Hostname failed"); - } + } } LoadHostname();