reportingbuzz
MIS
Hi,
I wish to grab the value of my hidden textbox and then go through an array of the radio buttons. Where there is a match, I would like to associate the checked property of that radio button to true. I am basically preserving the state of the radio button so that the users know which radio button they last clicked on when they click on the back button of the browser.
hCrystalRadio - name of the hidden textfield
openedCrystalItem - variable to hold the value of the textfield
crystalradio - name of the radio group that shows the names of the reports
I get an error at the above red line. Syntax is wrong. what is the right syntax to refer to the radio button?
Error I get is:
document.commission.crystalradio[...] is null or not an object.
Thanks.
I wish to grab the value of my hidden textbox and then go through an array of the radio buttons. Where there is a match, I would like to associate the checked property of that radio button to true. I am basically preserving the state of the radio button so that the users know which radio button they last clicked on when they click on the back button of the browser.
hCrystalRadio - name of the hidden textfield
openedCrystalItem - variable to hold the value of the textfield
crystalradio - name of the radio group that shows the names of the reports
Code:
//Remember the last report clicked on
if(document.commission.hCrystalRadio.value != "")
{
openedCrystalItem = document.commission.hCrystalRadio.value
alert('Here b4: '+ openedCrystalItem);
for(i=0;i<document.commission.crystalradio.length;i++)
{
document.commission.crystalradio[openedCrystalItem[i]].checked = true;
}
}
I get an error at the above red line. Syntax is wrong. what is the right syntax to refer to the radio button?
Error I get is:
document.commission.crystalradio[...] is null or not an object.
Thanks.