// The client event 'SelectionChanged' takes two parameters sender and e
// sender is the object which is raising the event
// e is the DropDownSelectionEventArgs
function WebDropDown_SelectionChanged(sender, e) {
//Gets the new collection of selected drop-down items
//Only one item will be in the collection when multiple selection is disabled
var newSelection = e.getNewSelection();
//Gets the text of the first drop-down item in the collection
var text = newSelection[0].get_text();
//Gets the index of the first drop-down item in the collection
var index = newSelection[0].get_index();
alert("Item '" + text + "' with index "+index+" is selected!");
}