I have a form that moves items from one picklist to another using a
button that calls the following ecmascript:

Code:
--------------------

function MoveCurrRole()
{
source = document.getElementById('_fvCurrentRoles').options
dest = document.getElementById('_fvRemovedRoles').options
destLength = dest.length
sourceLength = source.length
for (i=0; i < sourceLength; i++)
{
if (source[i].selected)
{
if (destLength == 0)
{
dest[dest.length] = source[i]
dest[dest.length - 1].selected = false
}
else
{
//Only allow one role per application
matchFound = 0
if (matchFound == 0)
{
dest[dest.length] = source[i]
dest[dest.length - 1].selected = false
}
else
{
break
}
}

if (sourceLength != source.length)
{
sourceLength = source.length
i--
}

}
}
sortlist('_fvRemovedRoles')
}

--------------------


Everything works fine in Firefox (of course), but with IE6 I get the
following error when I try to execute this script at the line
"dest[dest.length] = source[i]":

Code:
--------------------

Error: Object doesn't support this property or method.

--------------------


So my initial hunch was the getElementbyId call was returning the wrong
object, but if it can grab the other picklist fine and populate the
array, then that's not it. My other hunch was that javascript was being
blocked by IE, which it wasn't. My last hunch is it's something to do
with referencing the array. Initially when the form loads,
fvCurrentRoles is populated with values, while fvRemovedRoles is
completely empty, and this ecmascript moves them over 1 by 1 when
pressed. I'm guessing firefox handles this case while IE6 throws an
exception?

Anyone have any other ideas on how to set the destination value
statically? I tried doing dest[0] = source[0].text, which failed.


--
mlee22
------------------------------------------------------------------------
mlee22's Profile: http://forums.novell.com/member.php?userid=25018
View this thread: http://forums.novell.com/showthread.php?t=371609