Well, you know what they say: if it ain't broken, don't fix it ;) Glad it's working.
However, you can optimize your code a bit. If all the setChecked* functions do is set the required item, you can make the function dynamic, so you only need one function instead of 20. Instead of passing in just the ID of the control, you can also pass in the indices of the array:
Code:
function setChecked(selvalue, first, second)
{
if(ID[first][second] == 'Y')
{
document.getElementById(selvalue).selectedIndex = 0;
}
else
{
document.getElementById(selvalue).selectedIndex = 1;
}
}
This way, you only need one method that you can call with different parameters:
Code:
onLoad="setChecked('opt3308', 0, 0);setChecked('opt3326', 0, 1);setChecked('opt3320', 1, 1); etc etc
I just made up the numbers I am passing to setChecked, but I am sure you get the idea.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to:
Soulfly (Universal Spirit Mix) by
Soulfly (Track 16 from the album:
Primitive)
What's This?