rem: element.value = testValue.string; 
add: if(element.nodeName.toLowerCase() === 'select') { var newOption = forms[formIndex].ownerDocument.createElement('option'); newOption.setAttribute('value', testValue.string); newOption.innerHTML = testValue.string; element.options[element.options.length] = newOption; element.selectedIndex = element.options.length - 1; } else { element.value = testValue.string; } 
context:     writeTabForms: function(forms, testFormIndex, testFieldIndex, testValue){        dump('-=-=-=-writeTabForms::forms ' + forms[0]);         if (forms[testFormIndex] === undefined){            dump('got an undefined\n');           }        dump('&& and the test form is : '+forms[testFormIndex]+ ' with '+                forms[testFormIndex].elements.length+'elements\n');        for (var formIndex = 0;             formIndex < forms.length;             formIndex++)        {            for (var elementIndex = 0;                  elementIndex < forms[formIndex].elements.length;                  elementIndex++)            {                var element = forms[formIndex].elements[elementIndex];                dump('checking whether this field ('+formIndex + ',' +elementIndex +')should be loaded with an evil value: ' + (formIndex === testFormIndex && elementIndex === testFieldIndex) + '\n');                if (formIndex !== null &&                     formIndex === testFormIndex &&                     elementIndex === testFieldIndex &&                    testValue !== null                   )                 {                    dump('going to force element ' +element.name  +' ('+ elementIndex                            +') to have value ' + testValue+ '\n');                    element.value = testValue.string;                    dump('element[' + elementIndex + '] has value' +                             element.value + ' \n');                }                else if (element.nodeType == 'submit' ||                          element.nodeType == 'reset' ||                          element.nodeType == 'image' ||                          element.nodeType == 'button')                {                    // don't care, this is here just to make sure the elements                     // are parallel.                }                 else if (element.nodeType == 'checkbox' ||                          element.nodeType == 'radio')                 {                    element.checked = this.tabForms[formIndex][elementIndex];                }                else {                    element.value = this.tabForms[formIndex][elementIndex];                }            }        }    }
meta: 9596	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9596/881c4adaedddaa6cb8123274dab1bed4c8c6af16/tabbrowsermanager.js/buggy/content/tabbrowsermanager.js