R
RobG
I found a couple of handy functions that will copy the text items from
one SELECT box to another (and back). This works great.
BUT... what I also need is the associated VALUE (from the options
value="whatever" tag)...
I tried this:
if (found != true) // if the option does not exist in destination
listbox, copy it over
{
destList.options[len] = new Option(srcList.options.text);
destList.options[len] = new Option(srcList.options.value); //
I added this line
len++;
}
But all it does is overwrite the text with the option.
How do you do it? It's probably something simple, but I sure can't
find it.
Thanks!
Rob
one SELECT box to another (and back). This works great.
BUT... what I also need is the associated VALUE (from the options
value="whatever" tag)...
I tried this:
if (found != true) // if the option does not exist in destination
listbox, copy it over
{
destList.options[len] = new Option(srcList.options.text);
destList.options[len] = new Option(srcList.options.value); //
I added this line
len++;
}
But all it does is overwrite the text with the option.
How do you do it? It's probably something simple, but I sure can't
find it.
Thanks!
Rob