Run JS inline inside the return of an AJAX

Asked

Viewed 180 times

2

I have a hotsite that works on AJAX and friendly urls (more specifically with PJAX). Where the top and bottom are fixed, and only the content is injected into the page.

The problem is that now, I can’t run the inline javascript of the content pages. I’ve read about giving eval in the returned text, but it seems to me that the eval is bad for performance. So how is the best way to do (or what you usually do)?

  • 1

    I believe a minimal example of how you would help people understand what you want, exactly.

1 answer

1

I believe that PJAX should rather be running its blocks <script type="text/javascript">...</script>.

Do you have an example of a block that is not running? You placed the attribute type="text/javascript" in them?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.