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.

Problem Embedding JavaScript Templates

December 09, 2010 6:45pm

Subscribe [3]
  • #1 / Dec 09, 2010 6:45pm

    insiteadvice

    68 posts

    I have the following code in my site/index template:

    [removed]{embed="site/.slider"}[removed]

    The javascript template does use EE tags.

    This works fine in IE 8 and Chrome, but in Firefox it’s showing the javascript code instead of processing it. IE 7 doesn’t process the code, but doesn’t show it either.

    Is this the right/best way to go about using EE tags in javascript?

    If so, any idea why this is happening and/or how to fix it?

    Thanks.

  • #2 / Dec 09, 2010 8:06pm

    Cheif

    626 posts

    Embeds will work, the interesting point is its platform/browser specific and EE operates irrespective of them ie. code is code.

    Try placing the code inline in the template (not embed) see if that yields any different results and clear the cache (EE & Browsers)

  • #3 / Dec 10, 2010 11:49am

    Ingmar

    29245 posts

    Thanks for the assist. Does that help?

  • #4 / Dec 10, 2010 1:47pm

    insiteadvice

    68 posts

    Right, that’s why I was so confused about it. Turns out there was a comment that wasn’t individually closed (had <—CODE <—CODE—>, only more complex…) which affected Firefox but not Chrome.

    Thanks.

  • #5 / Dec 11, 2010 3:00pm

    Greg Salt

    3988 posts

    Hi insiteadvice,

    Glad that you got this resolved. Please post back if required.

    Cheers

    Greg

    @Cheif, thanks for the help.

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

ExpressionEngine News!

#eecms, #events, #releases