Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checking for empty radios

Status
Not open for further replies.

2cxc

Programmer
Aug 29, 2003
245
CA
I have a set of radio buttons call radioGroup, how can i check to see if any in the group has a value of true and if not then....

This is what i have so far, not sure if correct:

if (radioGroup == true) {
var temp = "true";
for (var i = 0; i<radioGroup.length; i++) {
if (radioGroup.getStateAt(i) == true) {
temp = &quot;false&quot;;
break;
}
}
return temp;
} else {
tellTarget (&quot;n&quot;) {
gotoAndPlay(&quot;show2&quot;);
///above is the error message saying to make a selection casue none has been made.
}
return true;
}
}
 
How many radios do you have?
Can't you just check them individually as I proposed?
 
And every single one of them if checked, will lead to a different page?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top