[thelist] Javascript and selectedIndex

David U. davidu at everydns.net
Mon Sep 9 08:32:01 CDT 2002


Joshua Olson wrote:

> 1.  selectedIndex is a number at all times.  The number represents the
> option within the select box that is selected, starting with 0 as the
> top item.

That's what I figured, so I had to use .value.

> 2.  The string concatenation for JS is +, not . (period).

Ahhh....what a dumb mistake.  After fixing that the whole thing came
together. Thanks so much.

The final line looks like:
form.end_time.value = endHour+":"+end_min+":"+end_am_pm;

and works fine!

Thanks again,
David Ulevitch





More information about the thelist mailing list