Ok well I figured out that you can reference the label of the radiobutton from the group name.
Survey1.selectedValue = 'While browsing the website';
But how is it done for a checkbox. This seems like an easy question, but I just can't figure it out.
1 person found this helpful
http://gumbo.flashhub.net/radiocheck/ source enabled
This may give you what you need - The logic assumes you are treating the checkbox like a radiobutton, you could always reskin a radiobutton if you wanted it to look like a checkbox.
That does help, but I am still curious why it is saying "can not access propert of null object" My input that I pass in is not null, I checked by displaying it in an alert.
This really is a mystery to me.
Maybe its the way the 'if' is done, possibly the better way would be to use a switch statement so that if there is a problem with the passed parameter it wouldn't break the code.
case 0: rb1.selected = true;
case 1: rb2.selected = true;
case 2: rb3.selected = true;
case 3: rb4.selected = true;
just a thought
 also for the other if statement i would do it this way
if (noemail=='n') checkbox=true else checkbox=false;