i have a page that i am creating were there are multiple drop downs, which can change dynamically. Each drop down has and associated set of Radio buttons (2). Each set is given a name such as radaccess and a number (I.E radaccess1, radaccess2, etc…) depending on the number of drop downs, again done dynamically. Now my problem is that when the page loads i am filling the form with values from a DB and trying to set whether the radio button, per specific drop down, is checked or not. the problem is that i can not figure out how to reference these values.
I have tried writing something like document.frmusered.radaccess+i+[0].checked = true;
but these does not work.
i have even tried to build a string like
for(var i = 0; i < (writecnt); i++) –> “writecnt = the number of drop downs”
var radaccess = ‘document.frmusered.radaccess’;
radaccess += i;
radaccess += ‘[0].disabled = true;’;
radaccess;
“even tried document.write(radaccess); but as you have figured out that didnt work out well”
radaccess = ‘document.frmusered.radaccess’;
radaccess += i;
radaccess += ‘[1].disabled = true;’;
radaccess;
i know this cant be that difficult to figure out. Can someone point out what i am over looking.
Thank you.