Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Modify the below sample code :
VF Page :
----------------------------------------------------
<apex:page controller="sampleCon">
<script type="text/javascript">
function getActive(selectedValue)
{
if( selectedValue == 'YES')
{
var ele=document.getElementById('{!$Component.form1.dropdown}');
ele.disabled =false;
}else if(selectedValue == 'NO')
{
var ele=document.getElementById('{!$Component.form1.dropdown}');
ele.disabled =true;
}
}
</script>
<apex:form id="form1">
<apex:selectRadio value="{!selectedValue}" layout="pageDirection" onchange="getActive(this.value);">
<apex:selectOption itemValue="YES" itemLabel="YES"/>
<apex:selectOption itemValue="NO" itemLabel="No"/>
</apex:selectRadio><p/>
<apex:selectList id="dropdown" size="1">
<apex:selectOption itemValue="YES" itemLabel="YES"/>
<apex:selectOption itemValue="NO" itemLabel="No"/>
</apex:selectList>
</apex:form>
</apex:page>
---------------------------------------------
Controller :
-------------------------
public class sampleCon {
public String selectedValue{get;set;}
}
------------------------------
Let us know if this helps.
Thanks,
Shravan
I did it allready, for one radio button called "nri". But how to do for second radio button "nonnri". If i repeat the same code it is showing errors like duplicate values, no nested form ----
Thanks,
Lakshmi.