I would advise to use jQuery for processing such events. Please see:
http://en.wikipedia.org/wiki/JQuery[
^],
http://jquery.com/[
^],
http://docs.jquery.com/Main_Page[
^].
Moreover, you can get something more advanced which is developed with some advanced handling in mind. Look at this widget,
jqxListBox
:
http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxlistbox/jquery-listbox-getting-started.htm[
^].
It helps you to define the list box and handle selection, in particular.
This is a part of jQWidgets suite.
http://www.jqwidgets.com/[
^].
However, check the license, especially if you are working for commercial use:
http://www.jqwidgets.com/license/[
^].
If you don't want it, it can develop your own jQuery plug-in of find something else.
—SA