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 removes javascript code

December 24, 2010 3:04pm

Subscribe [4]
  • #1 / Dec 24, 2010 3:04pm

    Musa

    124 posts

    Hello,
    i’ve following code in a template -

    < script type="text/javascript" >
        _qoptions= {
                qacct:"xxx"
                        };
    < /script >

    EE parsed this code as

    < script type="text/javascript" >
        _qoptions= ;
    < /script >

    Any idea how to solve this? BTW - my template is “web page” type in EE 1.6.8

    Thanks

  • #2 / Dec 26, 2010 9:18am

    Cheif

    626 posts

    Obviously EE is parsing the EE “{” brackets. Will need more info on how you’re calling the JS (ie. template, snippet, body field etc)

  • #3 / Dec 26, 2010 11:37am

    Musa

    124 posts

    This code is not in a js template, its in a embedded template which is “web page” type template.

    Obviously EE is parsing the EE “{” brackets. Will need more info on how you’re calling the JS (ie. template, snippet, body field etc)

  • #4 / Dec 27, 2010 2:29am

    Musa

    124 posts

    Still i fighting with this problem, any solution?

  • #5 / Dec 27, 2010 8:23am

    Cheif

    626 posts

    NFI, try simplifying by placing inside the template (not embed) or section out to a snippet.

  • #6 / Dec 27, 2010 4:26pm

    Ingmar

    29245 posts

    Try a different template type, e.g. “static”.

  • #7 / Dec 27, 2010 4:29pm

    Musa

    124 posts

    Hello Ingmar Greil,
    Its terrible, kills many hours :(. I tried that too, same problem. If you want - i can show you. One note: The issue arised after i moved site from a hosting to engine hosting.

    Thanks

  • #8 / Dec 28, 2010 1:26am

    Brandon Jones

    5500 posts

    Hi Musa,

    Make sure that in Admin ›  System Preferences ›  Output and Debugging Preferences you have Debug Preference set to 1. PHP/SQL error messages shown only to Super Admins. Does that help?

  • #9 / Dec 28, 2010 8:09am

    Musa

    124 posts

    Hi Brandon Jones,
    If i make this on, an sql error message and the rest of the pages doesnt come. So i made this off. Do you have any idea how to solve my problem “EE removes javascript code”


    Thnx

  • #10 / Dec 28, 2010 3:23pm

    Ingmar

    29245 posts

    Please do turn it on. Turnig it off completely is never recommended. What message are you getting? If you’ve set this to “1” it’s only shown to Superadmins anyway.

  • #11 / Dec 28, 2010 3:25pm

    Musa

    124 posts

    It shows a sql query error, let me fix the sql error first.
    Thanks

  • #12 / Dec 28, 2010 3:31pm

    Ingmar

    29245 posts

    Sure. If you’d tell us what it is we might be able to assist you there as well.

  • #13 / Dec 30, 2010 1:42am

    Musa

    124 posts

    I’ve fixed the sql error, then i saw - the problem is doesn’t exist, don’t know how this got fixed.
    Anyway, thanks everyone for your help. please close this thread.

    Best,
    Musa

  • #14 / Dec 30, 2010 9:16am

    Sue Crocker

    26054 posts

    Glad things are working again.. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases