[thelist] Javascript and selectedIndex

Joshua Olson joshua at waetech.com
Mon Sep 9 07:21:00 CDT 2002


----- Original Message -----
From: "David U." <davidu at everydns.net>
Subject: [thelist] Javascript and selectedIndex


> Hi,
>
> I tried writing it up here and it just looked SO ugly so I put the
question
> online and formatted nicely.
>
> Please take a look if you are a JS master.
>
> http://david.ulevitch.delmar.ca.us/evolt_help.php

Hello David,

Putting your code online like that was a wonderful idea... thanks for being
considerate for digest members.  Here are a few thoughts to ponder.

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.

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

3.
http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=JS+selectedIndex+site
%3Anetscape.com

#3 is a link that has a lot of examples of select box JS in action.  You may
find it helpful.

-joshua




More information about the thelist mailing list