BUG: The selected attribute of an option element is missing in a cloned ComboBox control This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
On This PageSYMPTOMSIn a ComboBox control or in a ListBox control, you may set the selected attribute of an option element that is other than the first option
element. If you use the cloneNode method in script code to clone the ComboBox control or the
ListBox control, you notice that either the selected attribute is missing or that the selected attribute is set for the first option element. WORKAROUNDTo work around this problem, store the selectedIndex property value of the option element before you clone the
ComboBox control or the ListBox control. Then, set the selectedIndex property value of the cloned control with the stored
value. For example, you may use the following code to clone the oCombobox ComboBox control: To work around the problem, modify your code as follows:STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
MORE INFORMATIONSteps to reproduce the behavior
REFERENCESFor more information about the cloneNode method, visit the
following Microsoft Developer Network (MSDN) Web site: http://msdn2.microsoft.com/en-us/library/ms536365.aspx (http://msdn2.microsoft.com/en-us/library/ms536365.aspx)
| Article Translations
|


Back to the top
