+ Start a Discussion
SHAIK MOHAMMAD YASEENSHAIK MOHAMMAD YASEEN 

how to know if the radio button is checked on click of button on vfpage

Hi All,

I am having below selectradio on my vfpage with values"agree" and "disagree", now my requirement id i need to check if the radio button is checked or not after clicking a button.

can any one please with code to implement this using javascript

<apex:pageBlock id="block">
<apex:selectRadio  id="radioButtonId" value="{!selectedValue}" styleClass="mandatoryField" >
<apex:selectOptions  value="{!RadioValues}" />
</apex:selectRadio>

Best Regards,
Mohammad Yaseen.
<apex:pageBlock id="block">
Prathyu bPrathyu b
Hi Shaik,

Try below example. You will get some idea.

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_selectRadio.htm (check for example )

Let me know if you need more help

Thanks
 
NagendraNagendra (Salesforce Developers) 
Hi Yaseen,

May I suggest you, please check with below links from the community forums which might help you accelerate further with the above requirement. Please let us know if this helps.

Thanks,
Nagendra