Topic: accessing rails variables in javascript

Hi-
I pass an array of customers object to a .rhtml file. When it is rendered on the browser, I call an onLoad function. I need to access the @customers objects array in my onLoad function. How can I do that. For example, I need to get to @customers[0][:customer_name] - how to do that? thanks

Re: accessing rails variables in javascript

Please only post in one forum. Duplicate post with reply here.

Railscasts - Free Ruby on Rails Screencasts