javascript problem

i have a list <html:select> in a tabbed pane. I have yet another list, which is empty to begin with. I give the user to move elements from the first list to the second.

I use javascript to move the elements. I have the code like this:

[CODE]

function listSelected()

{

var name;

var value;

if(!document.form.tabbedPanel1.mapDates.lstDateRange.disabled)

{

alert("inside if");

var lengthSel = document.form.mapDates.lstDateRange.options.length;

var k=0;

for(i=0; i<lengthSel; i++)

{if(document.form.tabbedPanel1.mapDates.lstDateRange.options.selected)

{

name = document.form.lstDateRange.options.text;

value = document.form.lstDateRange.options.value;

document.form.lstDateRange.options[document.form.lstDateRange.length] = new Option(name,value);

}

}

while(k><lengthSel)

{

if(document.form.lstDateRange.options[k].selected)

{

document.form.lstDateRange.options[k] = null;

lengthSel =lengthSel-1;

}

else

k++;

}

}

}

[/CODE]

I get the following exception: document.form.tabbedPane1.mappedDates is null or not an object. Please help!>

[1282 byte] By [jaya-shreea] at [2007-10-2 21:36:41]
# 1
This is a JAVA forum, not a JavaScript forum...java is not related at all with JavaScript. You should look on a JavaScript forum for help
Kzeona at 2007-7-14 0:50:55 > top of Java-index,Java Essentials,Java Programming...
# 2
Contrary to what the names might imply java scrip has about as much to do with java as pigs and guinea pigs
Norweeda at 2007-7-14 0:50:55 > top of Java-index,Java Essentials,Java Programming...
# 3
I really like this one. very, incredible xD
Kzeona at 2007-7-14 0:50:55 > top of Java-index,Java Essentials,Java Programming...
# 4
Javascript was originally named livescript, and netscape should have kept it that way.But, if the name you are getting in your exception (mappedDates) is correct, then it looks like you have a naming problem. In the script you provided the object was called mapDates...
jduva at 2007-7-14 0:50:55 > top of Java-index,Java Essentials,Java Programming...