JavaScript
A5.ListBoxindexFromEvent Method
Syntax
A5.ListBox.indexFromEvent(event)
Arguments
- eventevent
A DOM event object.
Returns
- indexnumber
The list row index the event occurred on. A value of -1 will be returned if the event did not occur over list row.
Description
Get the index of the list row an event occurred on.
Example
// To get a pointer to the A5.ListBox class see {dialog.object}.getControl
// assume lObj is a pointer to an instance of the A5.ListBox class
// and that "e" is a DOM onclick event
var indx = lObj.indexFromEvent(e); // "indx" will equal a number representing the "renderIndex" of the element clicked onSee Also