You need to sign in to do that
Don't have an account?
Gm Chouhan
apex list value store into java array variable
hi,
i have create list in apex and i want to list value into java script array variable.
pls help me.....
i have create list in apex and i want to list value into java script array variable.
pls help me.....
See the links below,
https://developer.salesforce.com/forums?id=906F000000098PgIAI
https://developer.salesforce.com/forums?id=906F000000096x0IAA
https://developer.salesforce.com/forums?id=906F000000096kcIAA
https://developer.salesforce.com/forums?id=906F000000096QxIAI
http://salesforce.stackexchange.com/questions/8200/converting-from-list-to-array
Regards,
Ashish
Go through simple example below.
Apex class:
public class DisplayArrayList{
public list<string> Arraylist{get;set;}
public DisplayArrayList(){
Arraylist=new list<string>();
Arraylist.add('January');
Arraylist.add('February');
Arraylist.add('March');
Arraylist.add('April');
Arraylist.add('May');
Arraylist.add('June');
Arraylist.add('July');
Arraylist.add('August');
Arraylist.add('September');
Arraylist.add('October');
Arraylist.add('November');
Arraylist.add('December');
}
}
visualforce page:
<apex:page controller="DisplayArrayList">
<script>
window.onload=function test(){
var s='{!Arraylist}';
alert(s);
}
</script>
{!Arraylist}
</apex:page>
if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.