click the arrow, and the items are moved from the source list to the target list. I use the 'name' field to locate the SELECT list.
In NS6, the following code works fine. In IE6, it fails
near the line marked. Does anyone have an idea why?
Where can I find the DOM properites and functions for IE?
I've been using the W3C references, but clearly IE must
be doing something different (as usual).
function moveListSelection(src, tgt)
source = document.getElementsByName(src) ;
if (source == null) return ;
target = document.getElementsByName(tgt) ;
if (target == null) return ;
* Move all selected options in source to the target
* note that if we start from 0, the remove will
* reorder subsequent items, so we start from the
* end of the source list.
tgtBefore = null ;
for (i=source.length-1; i>=0; i--)
option = source.options.item(i) ;
target.add(option, tgtBefore) ; // **IE quits here!! why?
tgtBefore = option ; // add next item before this one