function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sonamsonam 

javascript call onChange event of radio button

Hi!

I need to define a javascript method on the event
like onChange='' some javascript code"  in the following code bt its giving an error: Unsupported attribute onchange in <apex:actionsupport>

             <apex:selectRadio value="{!Value}">
                    <apex:selectOptions value="{!items}"/>
                     <apex:actionsupport event="onchange" rerender="someBlock" status="waitStatus"  onChange='' some javascript code" />
                 </apex:selectRadio>

Thanks in advance.

RoshRosh
Hi Sonam,
 Actually there is no attribute named "onchange" in actionsupport,
If you want to call a javascript function on change event of radio button then you can call it directly without using actionSupport:

eg:

<apex:selectRadio value="{!Value}" onChange="some javascript code">
    <apex:selectOptions value="{!items}"/>
</apex:selectRadio>

If my answer solves your problem, then please mark its as solution.