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
satyaprakash palsatyaprakash pal 

how to store the <apex:repeat> values using javascript in array

Hi 
I am new in salesforce, i want to store the <apex:repeat> values in a variable or array using javascript .
How it is possible ?

please find the bellow code for reference.

<div class="accordion_body closed"> <apex:outputPanel id="catPanel" > <apex:repeat value="{!ResultCatalog.categories}" var="category" id="thecategories"> <apex:outputPanel rendered="{!ResultCatalog.categories[category]}"> <label class="label_check c_on " for="{!category}" title="{!category}"> <input id="{!category}" type="checkbox" checked="true" onclick="javascript:doAddLimiter('Job_Category_Description__c','{!category}');" /> {!category} </label> </apex:outputPanel> <apex:outputPanel rendered="{!NOT(ResultCatalog.categories[category])}"> <label class="label_check" for="{!category}" title="{!category}"> <input id="{!category}" type="checkbox" onclick="javascript:doAddLimiter('Job_Category_Description__c','{!category}');" /> {!category} </label> </apex:outputPanel> </apex:repeat> </apex:outputPanel> </div>



 
Gaurav KheterpalGaurav Kheterpal
Try this
 
var SFObjectArray = new Array();
<apex:repeat value="{!arrayItems}" var="arrayItem">
SFObjectArray.push('{!arrayItem}');
</apex:repeat>