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
Micky MMicky M 

Javascript remoting

Hi All,

Does anyone know how when i get a list of obects back from a remote call i can assign this to be used in a datatable, so if in javascript ive got something like 

var myList = [];

for(some loop or other)
   myList.push(results[n];

how if at all can i get {!accounts} assigned to the value of myList? is that even possible? im new to javascript remoting.

<apex:dataList value="{!accounts}" var="account">
    <apex:outputText value="{!account.Name}"/>
</apex:dataList>

Thanks
bob_buzzardbob_buzzard
No, you can't do that I'm afraid.  The datatable is converted to HTML server side, so you can't influence that from the client. Instead you'll have to replace the datatable with HTML markup that replicates it for your list of accounts.
Micky MMicky M
Thanks bob thats what i needed to know. I havent done any of this before so its all new ... and confusing.