The $F() function works off of the id attribute, not the name one.  
You're best bet is to search through this group.  There have been a 
number of functions posted that can provide you the checked value of a 
group of radio buttons.  Using one of them, you can get the two values, 
both of them are valid, run your function.

 - Dash -

[EMAIL PROTECTED] wrote:
> I have 2 radio button groups. One called hire_group, one called
> hire_period.
>
> I want my function to run only if both radio button groups have been
> checked. I'm fairly new to both JS and Prototype so its just a syntax
> question really. I've tried:
>
> if((document.forms[0].hire_period.checked 
> )&&(document.forms[0].hire_group.checked ))
>
> and I've also tried using
>
> ($F('hire_group').checked )&&($F('hire_period').checked )
>
> but I'm not having any luck. Can someone please explain what I need
> please? Many thanks.
>
>
> >
>
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to