You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am bit new in Esp8266 trying to build interactive code that make the data updated webserver eventually
so i have a html error trying to solve it but it seem something i dont know if anyone have the reason
my code in lua
`
data = 10
print (data)
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
conn:on("receive",function(conn,payload)
local buf=""
local buf2=""
print(payload)
if data <1000 then data=data+1
elseif data>999 then data=0 end
tmr.delay(700000)
print (data)
i am bit new in Esp8266 trying to build interactive code that make the data updated webserver eventually
so i have a html error trying to solve it but it seem something i dont know if anyone have the reason
my code in lua
`
data = 10
print (data)
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
conn:on("receive",function(conn,payload)
local buf=""
local buf2=""
print(payload)
if data <1000 then data=data+1
elseif data>999 then data=0 end
tmr.delay(700000)
print (data)
-- buf=buf.." "
buf=buf..""
buf=buf..data
buf=buf.."\n\n"
buf = buf.."</script>\n"
buf = buf.."<script>\n"
buf=buf.."var xmlHttp=createXmlHttpObject();\n "
buf=buf.."function createXmlHttpObject(){;\n"
buf=buf.."if(window.XMLHttpRequest){\n"
buf=buf.."xmlHttp=new XMLHttpRequest();\n"
buf=buf.."}else{\n"
buf=buf.."xmlHttp=new ActiveXObject('Microsoft.XMLHTTP');\n"
buf=buf.."}\n"
buf=buf.."return xmlHttp; "
buf=buf.."\n"
buf=buf.."}\n"
buf=buf.."function response(){\n"
buf=buf.."xmlResponse=xmlHttp.responseXML;\n"
buf=buf.."xmldoc = xmlResponse.getElementByTagName('data').innerHTML;\n"
end)
`
and the error
(index):38 PUT http://192.168.1.8/XML net::ERR_CONNECTION_TIMED_OUT
process @ (index):38
(anonymous) @ VM10646:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10645:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10644:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10643:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10642:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10641:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10640:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10639:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10638:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10637:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10636:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10635:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10634:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10633:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10632:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10631:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10630:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10629:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10628:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10627:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10626:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10625:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10624:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10623:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10622:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10621:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10620:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10619:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10618:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10617:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10616:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10615:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10614:1
(index):32 Uncaught TypeError: Cannot read property 'getElementByTagName' of null
at XMLHttpRequest.response ((index):32)
response @ (index):32
XMLHttpRequest.send (async)
process @ (index):38
(anonymous) @ VM10646:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10645:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10644:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10643:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10642:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10641:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10640:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10639:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10638:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10637:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10636:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10635:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10634:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10633:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10632:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10631:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10630:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10629:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10628:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10627:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10626:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10625:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10624:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10623:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10622:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10621:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10620:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10619:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10618:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10617:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10616:1
setTimeout (async)
process @ (index):39
(anonymous) @ VM10615:1
(index):32 Uncaught TypeError: Cannot read property 'getElementByTagName' of null
at XMLHttpRequest.response ((index):32)
at process ((index):36)
at :1:1
The text was updated successfully, but these errors were encountered: