ItemSelected: function (sender, args)
sender. Event source.
args. Event information.
The ItemSelected event is fired on selecting a list item.
To execute the example, create the ListBox component (see Example of Creating the ListBox Component) named listbox. Add the ItemSelected event handler:
listbox.ItemSelected.add(function(sender, args)
{
confirm(listbox.getSelectedItem().getContent());
});
After executing the example the HTML page contains the list of items displayed on the Example of Creating the ListBox Component page. On selecting list elements, a message that shows element content appears on the screen.
See also: