Unable to call JS scripts from a partial loaded via AJAX

I am loading a partial via AJAX in my Rails 3 app. I want to have some
partial related JS loaded when that partial loads so that I am only
loading JS when needed.

No matter what I do, I cannot get the JS elements to render.
I have used variations of the Rails javascript load helpers as well as
straight up tags. No matter what I do when I look at the
markup loaded by AJAX I never see my tags.

I can always load css that’s part of the partial just fine, but never
JS.

What’s going on here?

Thanks, Elliott G

On Jun 7, 2011, at 10:05 PM, elliottg wrote:

JS.

What’s going on here?

Prototype strips out inline scripts unless you set the property
evalScripts:true inside your Ajax parameters. In the Rails helper,
that’s probably done by adding :eval_scripts => true somewhere, give
that a try.

Walter

Thanks for the input Walter, I think this will set me in the right
direction.

While I have your ear, do you know the solution for jQuery? I am
seeing a bit about .load() have some tag stripping issues but have yet
to find the solution.

Thanks, EG