diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js
index 5a70b60ed..65ff2d343 100644
--- a/fhem/www/pgm2/fhemweb.js
+++ b/fhem/www/pgm2/fhemweb.js
@@ -236,9 +236,12 @@ FW_jqueryReadyFn()
.html(''+$(this).html()+'')
.css({cursor:"pointer"})
.click(function(){
- var aname = "#sel_attr"+$(this).attr("data-name").replace(/\./g,'_');
- $(aname).val($(this).text());
- FW_detailSelect(aname);
+ var attrName = $(this).text();
+ var sel = "#sel_attr"+$(this).attr("data-name").replace(/\./g,'_');
+ if($(sel+" option[value='"+attrName+"']").length == 0)
+ $(sel).append('');
+ $(sel).val(attrName);
+ FW_detailSelect(sel, true);
});
});
@@ -991,7 +994,7 @@ FW_longpoll()
/*************** WIDGETS START **************/
/*************** "Double" select in detail window ****/
function
-FW_detailSelect(selEl)
+FW_detailSelect(selEl, mayMissing)
{
if(selEl.target)
selEl = selEl.target;
@@ -1003,18 +1006,21 @@ FW_detailSelect(selEl)
devName = $(div).attr("dev"),
cmd = $(div).attr("cmd");
- for(var i1=0; i1 selVal.length)
- vArr = arg.substr(selVal.length+1).split(",");
+ if(i1==listArr.length && !mayMissing)
+ return;
+ if(i1 selVal.length)
+ vArr = arg.substr(selVal.length+1).split(",");
+ }
var newEl = FW_replaceWidget($(selEl).next(), devName, vArr,undefined,selVal);
if(cmd == "attr")