Using javascript, I am trying to change the selection of the listbox item like this:
function selectFirstActiveListItem(oListBox)
{
for (var i = 0; i < oListBox.options.length; i++)
{
oListBox.selectedIndex = i;
var szStatus = GetDomboBoxItemAttribute("Status", m_pdocConnectType.getXMLDOM(), oListBox);
if ("Enabled" == szStatus)
return;
}
oListBox.selectedIndex = 0;
}
Though the index correctly changes at the background, but it is not reflected on the UI. The listbox still shows the old selection.
What's going wrong?