when you say a listbox do you mean a 'select' tag.
if so document.<formname>.<selectname>.value can be used to get the value of the selected option.
(where <forname> and <selectname> are the names of the form and select resp.)
think this should be null if none selected yet.
or
document.<formname>.<selectname>.selectedIndex returns the index of the selected option (ie. its position in the list)
document.<formname>.<selectname>.option[<index>].value can then be used to get the value of any given option (eg. the one you have just got from selectedIndex)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.