0
{!Account.contacts[i].Lastname}

where i is Javascript loop variable.

ERROR : Unknown property 'AccountStandardController.i'

  • can you please add the code. – Annappa PH Feb 23 '18 at 11:35
3

I presume this is a Visualforce page.

This expression:

{!Account.contacts[i].Lastname}

is processed at the server-side where any values used such as i must exist as properties on the Apex controller. Once that processing is done, the resulting HTML is passed to the client-side (the browser) where there can also be a JavaScript variable i.

Best to think more about what you are trying to achieve keeping the server-side/client-side distinction in mind.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.