Christina wrote:
Quote:
I have 2 list boxes - one to fill the second one based on the selection, or
move all items. You can remove the selection (or all items) from the second
one to place it back in the first one. I expanded my horizons and thought
to use script based on the js node operation appendChild(). It seemed so
clean and easy to follow. Works beautifully in IE, but Firefox sees the
value for a nanosecond but doesn't put it in the box.
Did you get an error message in the error console? Get the Firebug
extension and you will won't miss them.
<URL:
https://addons.mozilla.org/firefox/1843/ >
Quote:
This is the relevant
js:
>
function addSide(){
var addIndex = document.forms[0].sides.selectedIndex;
>
if (addIndex >= 0)
{
document.forms[0].selectedSides.appendChild(document.forms[0].sides.options(addIndex));
This should produce an error message something like:
"document.forms[0].sides.options is not a function"
The options object is a collection, you want to refer to its members by
index using square bracket notation:
...appendChild( document.forms[0].sides.options[addIndex] );
and so on for the rest of your script.
--
Rob