Topic: js and pointing to local file with a variable

I'm trying to pull some dynamic data from an XML feed. I have a JS program that needs to view the method, but it's not finding it right. I think it's looking in the public folder instead of the folder it's currently in.

This is the JS line:

so.addVariable("data_file", escape("/stats_pack/email_stats2/" + <%= @email.id %>));

I need to basically point to:

/stats_pack/email_stats2/:id

but not sure how to do this.

Any help is appreciated.
Thanks!
-matthew vb

matthewvb

Re: js and pointing to local file with a variable

Problem solved. Used:
http://api.rubyonrails.org/classes/Acti … ml#M000267

matthewvb