Detecting checked radios

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
kloudfreak
Posts: 1
Joined: Sun Jun 21, 2009 6:25 am

Detecting checked radios

Post by kloudfreak » Sun Jun 21, 2009 6:30 am

I have a group of 10 radio buttons. Each one has a different id and value, but they all have the same name.
Is it possible using iMacros or javascript to determine what radio button of a group is checked?
Or is it possible to determine if a particular radio is checked?
Marcia, Tech Support
Posts: 1095
Joined: Thu Jan 29, 2009 1:10 pm

Re: Detecting checked radios

Post by Marcia, Tech Support » Thu Jul 02, 2009 7:43 pm

Hello,

You can extract the state of a radio button with EXTRACT=CHECKED:

Code: Select all

TAG POS=1 TYPE=INPUT:RADIO FORM=NAME:NoFormName ATTR=NAME:Sex&&VALUE:male EXTRACT=CHECKED
The extract will have "YES" if its checked and "NO" otherwise.

I hope this helps you.
Regards,

Marcia
Post Reply