rem: var inputs = span.getElementsByTagName("input"); var spanValue = ""; for (var inputIndex = 0; inputIndex < inputs.length; inputIndex++) { var input = inputs[inputIndex]; if (input.checked) { if (spanValue != "") spanValue += " "; spanValue += input.value; } } span.value = spanValue; } 
add: var inputs = span.getElementsByTagName("input"); var spanValue = ""; for (var inputIndex = 0; inputIndex < inputs.length; inputIndex++) { var input = inputs[inputIndex]; if (input.checked) { if (spanValue != "") spanValue += " "; spanValue += input.value; } } span.value = spanValue; } 
context:                 function computeSpanValue(span) {                    var inputs = span.getElementsByTagName("input");                    var spanValue = "";                    for (var inputIndex = 0; inputIndex < inputs.length; inputIndex++) {                        var input = inputs[inputIndex];                        if (input.checked) {                            if (spanValue != "") spanValue += " ";                            spanValue += input.value;                        }                    }                    span.value = spanValue;                }
meta: 5390	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5390/4c60852e55587e10b08d8f0308561a8dcf2376bd/xforms.js/buggy/src/examples/web/oxf-theme/javascript/xforms.js