Updating SELECT form with array of values.

wxdqz

New Member
Hi,

I have a JSP program with javascript code passing slected values of a SELECT form from one frame to another.
PushLookup() creates array of selected values in one frame. SetValue() should populate SELECT form in another frame with values from this array on onClick event. It doesn't work to me somehow... ;-(

Please, help!...

function setValue(name, values) {
var param = eval('parent.frames["procedure"].document.forms[0].' + name);
var len = values.length;
for (x = 0; x < len; x++)
param[x].value = values[x].value;
}

function pushLookup(menu, item) {
var len = menu.length;
var ctr = 0;
var values = new Array();
for (x = 0; x < len; x++)
if (menu[x].selected && menu[x].value!='0'){
values[ctr] = menu[x].value;
ctr++;
}
setValue(item, values);
}
 
Back
Top