2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

FHEWMWEB: Disable connecting warning when clicking on value

git-svn-id: https://svn.fhem.de/fhem/trunk@3454 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-07-19 15:42:28 +00:00
parent 8f153f7a01
commit 6b2429fa07

View File

@ -2,6 +2,7 @@
var FW_pollConn;
var FW_curLine; // Number of the next line in FW_pollConn.responseText to parse
var FW_widgets = new Object(); // to be filled by fhemweb_*.js
var FW_leaving;
function
FW_cmd(arg) /* see also FW_devState */
@ -14,7 +15,7 @@ FW_cmd(arg) /* see also FW_devState */
function
FW_doUpdate()
{
if(FW_pollConn.readyState == 4) {
if(FW_pollConn.readyState == 4 && !FW_leaving) {
var errdiv = document.createElement('div');
errdiv.innerHTML = "Connection lost, reconnecting in 5 seconds...";
errdiv.setAttribute("id","connect_err");
@ -200,3 +201,9 @@ FW_querySetSelected(el, val)
if(el.options[j].value == val)
el.selectedIndex = j;
}
window.onbeforeunload = function(e)
{
FW_leaving = 1;
return undefined;
}