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 tags in JavaScript

February 12, 2009 4:21pm

Subscribe [2]
  • #1 / Feb 12, 2009 4:21pm

    sabremarketing

    27 posts

    I have some JavaScript in a template like so:

    [removed]
    
        $(document).ready(function() {
            $("#contact_form").validationAideEnable(null, {showInlineMessages:true});
        });
    
    [removed]

    And the {showInlineMessages:true} looks like it is being removed by EE because it thinks it’s a tag?

    I tried the config protect_javascript value($conf[‘protect_javascript’] = “n”;), but no worky.

    Thanks for any help.

  • #2 / Feb 12, 2009 4:25pm

    Ingmar

    29245 posts

    Try setting the template type to “Static”, or “Javascript”, or simply introduce a linebreak after the curly quote: Javascript won’t care, and EE can’t confuse it with a variable.

  • #3 / Feb 12, 2009 4:32pm

    sabremarketing

    27 posts

    Thanks, the line break did the trick. I tried the template as static, but it didn’t change anything.

    Thanks for the quick help.

  • #4 / Feb 12, 2009 4:46pm

    Ingmar

    29245 posts

    Glad that took care of things 😊

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

ExpressionEngine News!

#eecms, #events, #releases