rem:  while(propertyElement.hasChildNodes()){ var removed = propertyElement.removeChild(propertyElement.firstChild); }  var options = element.options;   for (var i = 0; i < options.length; i++) { if (options[i].selected) { var optionId = options[i].id; var optionElement = EchoClientMessage.messageDocument.createElement("option"); optionElement.setAttribute("id", optionId);  propertyElement.appendChild(optionElement); } } } 
add:  for (var i=0; i<optionDivElements.length; i++){ if (optionDivElements[i].selectedState) { var optionId = optionDivElements[i].id; var optionElement = EchoClientMessage.messageDocument.createElement("option"); optionElement.setAttribute("id",optionId);  propertyElement.appendChild(optionElement); } } } 
context: EchoListBox.createUpdates = function(elementId,propertyElement){    var element = document.getElementById(elementId);    // remove previous values    while(propertyElement.hasChildNodes()){        var removed = propertyElement.removeChild(propertyElement.firstChild);    }    var options = element.options;    // add new values            for (var i = 0; i < options.length; i++) {        if (options[i].selected) {            var optionId = options[i].id;            var optionElement = EchoClientMessage.messageDocument.createElement("option");            optionElement.setAttribute("id", optionId);            // EchoDebugManager.consoleWrite("added " + optionId);            propertyElement.appendChild(optionElement);        }    }}
meta: 498	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/498/c80db1fd5968161de7d0f741c89eae6100c044c8/ListBoxManual.js/buggy/src/webcontainer/java/nextapp/echo2/webcontainer/resource/js/ListBoxManual.js