You mean something like this?
PHP Code:
function MyTextListControlName.onSelect(entryid,entrytext,entryindex) {
echo("The player clicked on: " @ entrytext);
}
If you don't know the name of your control and use the catchevent function, then it will look like this:
PHP Code:
catchevent("MyTextListControlName","onSelect","MyEventCatchFunction");
...
function MyEventCatchFunction(controlobj,entryid,entrytext,entryindex) {
echo("The player clicked on: " @ entrytext);
}