Hello,

I have been trying to pass values obtained from ruby methods to a javascript file that I downloaded off the web with little success.

Part of the javascript file is like that
Code:
photos({id:'my_photos',
          border:'',
          size_mode:'image',
          width:150,
          height:100,
          sides:4,
          steps:10,
          speed:8,
          direction:'top',
          images:['/images/pic18.jpg',
                  '/images/pic2.jpg',
                  '/images/pic3.jpg',
		  '/images/pic1.jpg'],
I want to change the section with the image links, so it can be changed with every page. I've created the ruby files to output the different image file names for the different pages, but if I do this:
Code:
'/images/<%= p[0] %>
etc, where the variable p[0] contains the name of the file, I get an error for unrecognized variable, although I try to declare the variable at the top of the page, and I am able to get it written on the page, so I know the value exist. Is there anyway I can get ruby variables to be passed to the javascript? I've checked various documentation,i am still at a lost.

Thanks,

CathyM