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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Radio Box - Increment Counter if not checked

Status
Not open for further replies.

tabbytab

Technical User
Joined
Mar 21, 2005
Messages
74
Location
GB
Hi Guys.

My problem is testing the state of 6 indivdual radio buttons before I increase a counter.

I call a funtion each time a radio button is clicked to increase a counter, however if the radio button is already checked then I do not wish to increase counter.

As there are 6 individual radio buttons is there an easy way to refer to them all rather than 6 examinations. The radio buttons are not grouped.


Thanks in advance
TabbyTab :)
 
tabbytab said:
As there are 6 individual radio buttons is there an easy way to refer to them all rather than 6 examinations. The radio buttons are not grouped.

No. And you can't even do that with grouped radio buttons - you still have to loop though them, examining each, to find out which is selected (AFAIK).

Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Thanks Dan

That saved a lot of time and tears!

Regards
Jonathan
 
Even if you could refer to them all, what use would it be? If they're not grouped, testing for a true/false value would be pointless, as more than one could be checked.

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top