jomjol / AI-on-the-edge-device

Easy to use device for connecting "old" measuring units (water, power, gas, ...) to the digital world
https://jomjol.github.io/AI-on-the-edge-device-docs/
5.91k stars 646 forks source link

Uncaught ReferenceError: doTake is not defined at HTMLInputElement.onclick (edit_reference.html:42) #126

Closed Coalado closed 3 years ago

Coalado commented 3 years ago

The js block is created AFTER the link that calls it. Browser: Latest Chrome

jomjol commented 3 years ago

Just testet "edit_reference.html" with Chrome, Firefox and Edge. No problem on any system.

Please give some more input, until then I'll close the issue.

Coalado commented 3 years ago

It's not a JS issue. The JS block is correct. Anyway, it sometimes works, sometimes not. I had the same issue with Chome and Edge.

Try to reload http://watermeter/edit_reference.html several times. Open the Web Debugger to bypass the browser Cache.

It seems that the webserver has a bug and does not finish connections.

The browser is loading "forever", and does not init the embedded JS.

image

image

Coalado commented 3 years ago

I get the same issues on other pages es well. Here, edit_config_param.html does not finish. As you can see on the screenshot, the server starts the response with "0\r\n\r\n" -> The header parser in chrome fails. Is there are a reason why you send the data "chunked"?

image

jomjol commented 3 years ago

I send the data "chunked" because depending on the size of the html or js-file, it is loaded from the SD-card in peaces and therefore is send chunked.

Coalado commented 3 years ago

That makes sense.