getSelectedId

returns the id of the selected item

string|array getSelectedId( [boolean as_array] );
as_arraybooleanspecifies whether the result should always be returned as an array.
The default value is false
string|arraythe id of the item

Example

var id = list.getSelectedId(); // id = someid
 
var id = list.getSelectedId(true); // id = [someid]

Related samples

See also
Back to top