ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

EE is changing my Javascript

March 23, 2009 10:20am

Subscribe [2]
  • #1 / Mar 23, 2009 10:20am

    turnstyle

    47 posts

    Hi all, I’d like to include some Javascript within the content of a page (as opposed to a template), but EE seems to be changing the code when it renders the page.

    For example…

    for (var i = 0; i < markers.length; i++) {

    is changed to this:

    for (var i = 0; i >< markers.length; i++) {

    How can I prevent this behavior?

  • #2 / Mar 23, 2009 11:52am

    Sue Crocker

    26054 posts

    When you say within the content of a page, are you meaning just putting in the code by itself?

    One thing you could try is to have a new template that is of type Static, and then embed that template inside the rest of your original template.

    Which build/version of ExpressionEngine are you using? You can find this information at the bottom of any control panel page.

  • #3 / Mar 23, 2009 12:00pm

    turnstyle

    47 posts

    I was just hoping to include the SCRIPT within the body of a page’s content, rather that having to separate the SCRIPT into a template—is there no way to disable EE from altering the content I supply a page?

    Thanks,  -Scott

  • #4 / Mar 23, 2009 3:06pm

    Sue Crocker

    26054 posts

    There is a config.php setting to protect javascript.

    EEWiki:// Hidden Configuration Values - Protect Javascript

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases