diff --git a/fhem/www/pgm2/fhemweb_slider.js b/fhem/www/pgm2/fhemweb_slider.js index 98107fc5f..ef353da81 100644 --- a/fhem/www/pgm2/fhemweb_slider.js +++ b/fhem/www/pgm2/fhemweb_slider.js @@ -96,8 +96,12 @@ FW_sliderCreate(slider, curr) document.ontouchmove = oldFn3; document.ontouchend = oldFn4; if(cmd) { if(cmd.substring(0,3) != "js:") - if(typeof val != "undefined") - FW_cmd(cmd.replace('%',val)+"&XHR=1"); + if(typeof val != "undefined") { + if(typeof FW_pollConn != "undefined") + FW_cmd(cmd.replace('%',val)+"&XHR=1"); + else + window.location = addcsrf(cmd.replace('%',val)); + } } else { if(typeof val != "undefined") slider.nextSibling.setAttribute('value', val); diff --git a/fhem/www/pgm2/fhemweb_time.js b/fhem/www/pgm2/fhemweb_time.js index 703abc771..264d66c20 100644 --- a/fhem/www/pgm2/fhemweb_time.js +++ b/fhem/www/pgm2/fhemweb_time.js @@ -19,8 +19,12 @@ FW_timeCreate(el,cmd) if(brOff > 0) { par.innerHTML = par.innerHTML.substring(0, brOff).replace('"-"','"+"'); - if(cmd) - FW_cmd(cmd.replace('%',v)+"&XHR=1"); + if(cmd) { + if(typeof FW_pollConn != "undefined") + FW_cmd(cmd.replace('%',v)+"&XHR=1"); + else + window.location = addcsrf(cmd.replace('%',v)); + } return; }