[Javascript] Listbox
Chris Tifer
christ at saeweb.com
Mon Feb 2 15:54:20 CST 2004
I wonder if Dave means instead that he'd like to know if they're selected.
Can you clear this up for us Dave?
But using what Peter has showed you, you can see that you can loop through
the options and determine if that particular one (or more) is selected.
Chris Tifer
----- Original Message -----
From: "Peter Brunone" <peter at brunone.com>
To: "'[JavaScript List]'" <javascript at LaTech.edu>
Sent: Monday, February 02, 2004 4:49 PM
Subject: RE: [Javascript] Listbox
>
> var myListLength = myList.options.length;
>
> If length is greater than zero, you have at least one item in the list.
>
> -----Original Message-----
> From: javascript-bounces at LaTech.edu On Behalf Of Dave Stoltz
>
> If I have a listbox (not a dropdown) named "mylist", how can I test to
> see if there are any values in the box? I need to test if it's empty or
> not.
>
> Thanks!
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list