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.

Can't save templates with Javascript code in it

February 15, 2013 12:06pm

Subscribe [1]
  • #1 / Feb 15, 2013 12:06pm

    kencheung

    5 posts

    I have not been able to save templates with Javascript code in it. I get an error [“This webpage is not available
    The connection to parr.com was interrupted. Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.”] whenever I try to insert any of the codes below. I tried them individually and get the same error for each. The code works just fine in a file outside of EE. They also work fine on our primary site (EE with Multi-site Manager). Our second site is using the same EE install and config file as the primary site. Anyone know how I can fix this problem? Note: I replaced the < with [ so the code will show up here. I also left out the dot in document dot write.

    [script type=“application/javascript” >
    documentwrite(“testing javascript”);
    [/script>

    [script type=“text/javascript” src=“http://code.jquery.com/jquery-1.7.2.min.js”>[/script>

    [script type=“text/javascript” src=”/js/responsive-menu-script.js”>[/script>

  • #2 / Feb 15, 2013 2:56pm

    kencheung

    5 posts

    Here’s an update. The problem actually happens on both sites. I was able to save the code below, but I can’t save the template/snippet if I remove any of the three lines before the script tags. Is this some sort of EE bug?

    {if site_version == "mobile"}{/if}
    This is just a test.
    {footer}
    [script type=“application/javascript” >
    documentdotwrite(“testing javascript”);
    [/script>
    [script type=“text/javascript” src=“http://code.jquery.com/jquery-1.7.2.min.js”>[/script>
    [script type=“text/javascript” src=”/js/responsive-menu-script.js”>[/script>

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

ExpressionEngine News!

#eecms, #events, #releases