You need to sign in to do that
Don't have an account?
Radio button select record to process
Hi,
I have custom VFPage with search functionality,with search button new section is displayed with Radio button to further process record, i want to get particular record based on radio button selection?
I have used javascript:
<script type="text/javascript">
var getRadioId = document.getElementsByName('{!$Component.theRad}');
alert(getRadioId);
for(i=0; i<getRadioId.length; i++)
if(getRadioId[i].checked) {
alert(getRadioId[i].value);
}
</script>
but not any luck. please have a look.
Are you sure you are accessing the radio element in correct order?
Because if the radio button is nested in other elements all those nestings need to be mention in the following call:-
var getRadioId = document.getElementsByName('{!$Component.theRad}');
yes, In page i used:
<apex:column style="width:5%;text-align:center">
<apex:facet name="header">Action</apex:facet>
<input type="radio" name="selection" checked="{!wrap.isSelected}" id="theRad"/>
</apex:column>