The closeDropdown Method

A popup window could contain any kind of components, so it is developer's job to copy the value from and close the popup if one of item is selected.

In the above example, we copy the selected item's label to the bandbox, and then close the popup by the following statement.

<listbox width="200px" onSelect="bd.value=self.selectedItem.label; bd.closeDropdown();">