Can't get selectedIndex property for listbox

Giganews Newsgroups
Subject: Can't get selectedIndex property for listbox
Posted by:  Russell Campbell (
Date: Thu, 10 Jul 2003

Posting again, since my first attempt never appeared:

In the onClick method of a listbox, I am attempting to retrieve the
selectedIndex property.  The listbox is set up to allow multiple selections.
Unfortunately, the property returns -1.  Clicking again returns the proper
result.  Yet when I do the same thing on the same listbox after changing it
to allow only one entry to be selected, it always returns the proper result
on the first click.  This is a pain.  Is there any way to get the proper
value during the onClick when the listbox is set to allow multiple entries?


Russell Campbell