diff --git a/app/modules/enduser_setup.c b/app/modules/enduser_setup.c index 5869765a..d6e44632 100644 --- a/app/modules/enduser_setup.c +++ b/app/modules/enduser_setup.c @@ -209,15 +209,16 @@ static const char http_header_500[] = "HTTP/1.1 500 Internal Error\r\n\r\n"; fetch('/aplist','GET', new_ap_list_repeat); } + function set_ssid_field() { + var sel = document.getElementById("aplist"); + document.getElementById("wifi_ssid").value = sel.value; + } window.onload = function() { refresh_status(); refresh_ap_list(); - document.getElementById("aplist").onchange = function() { - var sel = document.getElementById("aplist"); - document.getElementById("wifi_ssid").value = sel.value; - } + document.getElementById("aplist").onclick = set_ssid_field; document.getElementById("credentialsForm").addEventListener("submit", function(){ fetch('/status','GET', new_status); }); @@ -227,7 +228,7 @@ static const char http_header_500[] = "HTTP/1.1 500 Internal Error\r\n\r\n"; #endif static const char http_html_backup[] = -"WiFi Login

WiFi Login

Connect gadget to your WiFi network

Status: Updating...

"; +"WiFi Login

WiFi Login

Connect gadget to your WiFi network

Status: Updating...

"; typedef struct scan_listener