hi
I have an array called aTrusts , and I need to take values from this array and bung them into a form field, depending on the value of a combo box.
This is the function I’m using to do this, and I get an “object expected” error on it every time – I’ve tried [I]everything
any ideas?
function setValues(sel)
{
val = sel.options[sel.selectedIndex].value;
x = 0;
for (i=0; i<aTrusts.length; i++)
{
if (aTrusts[i][0] == val) {
comp = aTrusts[i][10];
x = 1
}
}
if (x == 1)
{
document.forms[0].InvAddress.value = comp;
}
else {
alert (“Value not found”);
}
}
The function is called by onchange=”(setValues(this)” on the combo box.