[Javascript] Listbox

Matt Barton javascript at mattbarton.org
Tue Feb 3 14:44:33 CST 2004


> This is what I have so far, but doesn't seem to work:
>
> for(count=1;count==howmany;count++)

This is where your problem is: the options array's first element is at index
0.  So you need your loop to go from 0 to (options.length - 1).  You'd do
this by specifiying your for like this:

for (count=0; count < howmany; count ++) {
    // stuff here
}

Matt




More information about the Javascript mailing list