diff --git a/www/pgm2/fhemweb.js b/www/pgm2/fhemweb.js index f7bc51af4..e4a7a2ec8 100644 --- a/www/pgm2/fhemweb.js +++ b/www/pgm2/fhemweb.js @@ -989,10 +989,9 @@ FW_doUpdate(evt) if(d.length != 3) continue; - if( d[0].match(/^#FHEMWEB:/) ) { - eval(d[1]); - - } else { + function + setValue(d) // is Callable from eval below + { $("[informId='"+d[0]+"']").each(function(){ if(this.setValueFn) { // change the select/etc value this.setValueFn(d[1].replace(/\n/g, '\u2424')); @@ -1016,6 +1015,13 @@ FW_doUpdate(evt) }); } + if( d[0].match(/^#FHEMWEB:/) ) { + eval(d[1]); + + } else { + setValue(d); + } + // updateLine is deprecated, use setValueFn for(var w in FW_widgets) if(FW_widgets[w].updateLine && !FW_widgets[w].second)