Article ID: 829907 - Last Review: May 31, 2007 - Revision: 2.1 BUG: The selected attribute of an option element is missing in a cloned ComboBox control
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: 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)
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|






















Back to the top