You need to sign in to do that
Don't have an account?
Does anyone know how to fetch value of <apex:inputHidden> tag, which is repeating.
<apex:page id="pgid" standardController="Account"> <script> function callDelete(paramId) { alert(document.getElementById(paramId)); <b>//Need value of hidden field containing account id but during rendering <apex:inputHidden></b> } </script> <apex:form id="frmid"> <apex:pageblock id="pgblockId"> <apex:pageBlockSection id="pgblcksec1" > </apex:pageBlockSection> <apex:pageBlockSection id="pgblcksec2"> <apex:pageBlockTable id="pgblcktb" value="{!lst}" var="acc"> <apex:column value="{!acc.name}"/> <apex:column value="{!acc.type}"/> <apex:column value="{!acc.phone}"/> <apex:inputHidden value="{!acc.id}" id="hdnaccid"/> <apex:column > <apex:commandButton id="cmdId" onclick="callDelete('{!$Component.hdnaccid}');" value="Delete"/> </apex:column> </apex:pageBlockTable> </apex:pageBlockSection> </apex:pageblock> </apex:form> </apex:page>
Try placing it inside one of your columns:
Regards.
Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.
All Answers
Try placing it inside one of your columns:
Regards.
Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.
I suppose that your class is not finished yet. You will need an extension controller or similar that has a List of Account (lst) to populate your pageBlockTable.
Regards.
Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.