You need to sign in to do that
Don't have an account?
Priyanka Reddy 74
How to pass ID for radio button dynamically in iteration.
Hi,
I want to pass id for radio button dynamically in iteration, can some one suggest how to do that.
<apex:repeat value="{!am.names}" var="n">
<td>
<input type="radio" name="radio1" id="{!n}" value="{!n}" onclick="test()"/>
{!n}
</td>
</apex:repeat>
Thank you.
Priyanka
I want to pass id for radio button dynamically in iteration, can some one suggest how to do that.
<apex:repeat value="{!am.names}" var="n">
<td>
<input type="radio" name="radio1" id="{!n}" value="{!n}" onclick="test()"/>
{!n}
</td>
</apex:repeat>
Thank you.
Priyanka
<div id="{!a.Id}"">
.......
</div>
Hi Ritu Sharma,
Could you please eloborate.
Thank you.
<div id="{!a.Id}"">
<apex:inputCheckBox value="{!a.field_name__c}" />
</div>
Then with javascript something like..
var anchor = document.getElementById("{!a.Id}").firstChild;
// Needed as often the first child is a reference to a text block
while (anchor != null && anchor.nodeType == 3) {
anchor = anchor.nextSibling;
}
// Do something here..
anchor.checked = true;