JavaScript detected?

Just trying to import a template and I'm getting the "JavaScript detected" error message.

I've searched the code for 'java' and 'js' and nothing comes up. I'm not sure what else to search for - any ideas?

Alex I., 4 years ago

Post your code :)

purplecircle, 4 years ago
<style type="text/css">
.style1 {
    font-family: georgia, palatino;
    font-size: 14px;
}
</style>
<body>
  <table border="0">
    <tbody>
      <tr>
        <td width="32" align="left">&nbsp;</td>
      </tr>
    </tbody>
  </table>
  <table id="Table_01"  border="0" cellspacing="0" cellpadding="0" align="center" style="width:595px;" >
    <tbody>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><a href="http://pc.createsend1.com/t/r/l/djlyxd/l/r/" target="_blank"><img editable="true"  src="https://i1.createsend1.com/ei/r/A4/F20/FBA/231504/csimport/bewilderwood_webstudy_00_0.jpg" width="595" border="0" alt="Purple Circle | Design + Digital | Our project of the month for November is the BeWILDerwood website" style="display:block;border-width:0px;border-style:solid;border-color:#000000;padding-top:0pt;padding-bottom:0pt;padding-right:0pt;padding-left:0pt;margin-top:0pt;margin-bottom:0pt;margin-right:0pt;margin-left:0pt;" /></a></td>
      <tr>
        <td>
            <a href="http://pc.createsend1.com/t/r/l/djlyxd/l/y/"><img editable="true"   src="https://i2.createsend1.com/ei/r/A4/F20/FBA/231504/csimport/bewilderwood_webstudy_01_1.jpg" width="595" height="213" alt="" style="display:block;border-width:0px;border-style:solid;border-color:#000000;padding-top:0pt;padding-bottom:0pt;padding-right:0pt;padding-left:0pt;margin-top:0pt;margin-bottom:0pt;margin-right:0pt;margin-left:0pt;" /></a></td>
    </tr>
    <tr>
        <td>
            <a href="http://pc.createsend1.com/t/r/l/djlyxd/l/j/"><img editable="true"   src="https://i3.createsend1.com/ei/r/A4/F20/FBA/231504/csimport/bewilderwood_webstudy_02_2.jpg" width="595" height="428" alt="" style="display:block;border-width:0px;border-style:solid;border-color:#000000;padding-top:0pt;padding-bottom:0pt;padding-right:0pt;padding-left:0pt;margin-top:0pt;margin-bottom:0pt;margin-right:0pt;margin-left:0pt;" /></a></td>
    </tr>
    <tr>
        <td>
            <a href="http://pc.createsend1.com/t/r/l/djlyxd/l/t/"><img editable="true"   src="https://i4.createsend1.com/ei/r/A4/F20/FBA/231504/csimport/bewilderwood_webstudy_03_3.jpg" width="595" height="426" alt="" style="display:block;border-width:0px;border-style:solid;border-color:#000000;padding-top:0pt;padding-bottom:0pt;padding-right:0pt;padding-left:0pt;margin-top:0pt;margin-bottom:0pt;margin-right:0pt;margin-left:0pt;" /></a></td>
    </tr>
    <tr>
        <td>
            <a href="http://pc.createsend1.com/t/r/l/djlyxd/l/i/"><img editable="true"  src="https://i5.createsend1.com/ei/r/A4/F20/FBA/231504/csimport/bewilderwood_webstudy_04_4.jpg" width="595" height="428" alt="" style="display:block;border-width:0px;border-style:solid;border-color:#000000;padding-top:0pt;padding-bottom:0pt;padding-right:0pt;padding-left:0pt;margin-top:0pt;margin-bottom:0pt;margin-right:0pt;margin-left:0pt;" /></a></td>
    </tr>
    <tr>
        <td>
            <a href="http://pc.createsend1.com/t/r/l/djlyxd/l/d/"><img editable="true"   src="https://i6.createsend1.com/ei/r/A4/F20/FBA/231504/csimport/bewilderwood_webstudy_05_5.jpg" width="595" height="429" alt="" style="display:block;border-width:0px;border-style:solid;border-color:#000000;padding-top:0pt;padding-bottom:0pt;padding-right:0pt;padding-left:0pt;margin-top:0pt;margin-bottom:0pt;margin-right:0pt;margin-left:0pt;" /></a></td>
    </tr>
    <tr>
        <td>
            <a href="http://pc.createsend1.com/t/r/l/djlyxd/l/h/"><img editable="true"   src="https://i7.createsend1.com/ei/r/A4/F20/FBA/231504/csimport/bewilderwood_webstudy_06_6.jpg" width="595" height="429" alt="" style="display:block;border-width:0px;border-style:solid;border-color:#000000;padding-top:0pt;padding-bottom:0pt;padding-right:0pt;padding-left:0pt;margin-top:0pt;margin-bottom:0pt;margin-right:0pt;margin-left:0pt;" /></a></td>
    </tr>
    <tr>
        <td>
            <a href="http://pc.createsend1.com/t/r/l/djlyxd/l/k/"><img editable="true"    src="https://i8.createsend1.com/ei/r/A4/F20/FBA/231504/csimport/bewilderwood_webstudy_07_7.jpg" width="595" height="214" alt="" style="display:block;border-width:0px;border-style:solid;border-color:#000000;padding-top:0pt;padding-bottom:0pt;padding-right:0pt;padding-left:0pt;margin-top:0pt;margin-bottom:0pt;margin-right:0pt;margin-left:0pt;" /></a></td>
    </tr>
    </tbody>
  </table>
  <table  border="0" cellspacing="0" cellpadding="0" align="center" bordercolor="#000000" style="width:595px;" >
    <tbody>
      <tr valign="top">
        <td width="540" bgcolor="#ffffff">
          <multiline label='Main copy'><p style="margin-top:0em;margin-bottom:1em;" ><span style="font-family:georgia,palatino;font-size:14px;" ><br>
          The previous BeWILDerwood website began life when the Norfolk based adventure park opened in 2007 and as we all know, online behaviour has changed  dramatically since then.</span></p>
          <p class="style1" style="margin-top:0em;margin-bottom:1em;font-family:georgia, palatino;font-size:14px;" >BeWILDerwood customers are many times more likley to visit the website from an iPad or mobile device than the average and most are visitors to the region. The new site needed to reflect this demographic and create a web presence that was simple and fast to use, but still retained the traditional friendly face it's known for.</p>
          <p class="style1" style="font-family:georgia, palatino;font-size:14px;" >The result? You can whizz all over the site faster, buy tickets much faster (without needing to print them out if you don't have a printer with you) and buy merchandise much, much faster.</p>
          <p class="style1" style="font-family:georgia, palatino;font-size:14px;" >And it's been a huge success according to BeWILDerwood Director Simon Egan when he said '&quot;Wow, the website looks mighty magnificent. In general - woaaaah !!!&quot;</p>
          <p class="style1" style="font-family:georgia, palatino;font-size:14px;" >Enough said!</p>
          <p style="margin-top:0em;margin-bottom:1em;" ><span style="font-size:14px;font-family:georgia, palatino;" >To talk about reinvigorating the design and writing for your internal and external communications, drop by at Howard Street whenever your heart desires or give us a call:</span><span style="font-size:14px;font-family:georgia, palatino;" ></span><span style="font-size:14px;font-family:georgia,palatino;" ><br />
             </span></p>
          <p style="margin-top:0em;margin-bottom:1em;" ><span style="font-size:14px;font-family:georgia,palatino;" ><em>Managing Director Michael is on 0115 9084 171 or <a  onMouseOver="this.style.background='#FFFF00'" onMouseOut="this.style.background='#FFFFFF'" href="mailto:michael.slack@purplecircle.co.uk" target="_blank" style="text-decoration:underline !important;color:#656566 !important;" >michael.slack@purplecircle.co.uk</a> </em></span></p>
          <p style="margin-top:0em;margin-bottom:1em;" ><span style="font-size:14px;font-family:georgia,palatino;" ><em>Director of Brands John Lyle is on 0115 9084 172 or <a  onMouseOver="this.style.background='#FFFF00'" onMouseOut="this.style.background='#FFFFFF'" href="mailto:john.lyle@purplecircle.co.uk" target="_blank" style="text-decoration:underline !important;color:#656566 !important;" >john.lyle@purplecircle.co.uk</a> </em></span></p>
          <p style="margin-top:0em;margin-bottom:1em;" ><span style="font-size:14px;font-family:georgia,palatino;" >Or to read John's thoughts on Berocca, The New Zealand brand, Tesco and their deadly sandwich offer and kids with iPads, visit:<em> <a  onMouseOver="this.style.background='#FFFF00'" onMouseOut="this.style.background='#FFFFFF'" href="http://pc.createsend1.com/t/r/l/djlyxd/l/u/" target="_blank" style="text-decoration:underline !important;color:#656566 !important;" >http://johnnylyle.co.uk</a> </em></span></p></multiline>
          <span style="font-size:14px;font-family:georgia,palatino;" ><em>You should really 'Like' us on Facebook too - what's not to like?</em></span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
<a class="sutsocialwrapped"  href="http://pc.createsend1.com/t/r/l/djlyxd/l/o/" target="_blank" style="text-decoration:none;" ><img  src="https://i9.createsend1.com/ei/r/A4/F20/FBA/231504/csimport/facebook_8.png" border="0" alt="facebook.png" width="32" height="32" sutsociallink="http://www.facebook.com/PurpleCircleDesign" style="display:block;" /></a>
          <table border="0">
            <tbody>
              <tr>
                <td width="32" align="left">
                  <p style="margin-top:0em;margin-bottom:1em;" ><span><br />
&ndash;</span></p>
                  <p style="margin-top:0em;margin-bottom:1em;" >&nbsp;</p>
                  <p style="margin-top:0em;margin-bottom:1em;" >&nbsp;</p>
                  <p style="margin-top:0em;margin-bottom:1em;" >&nbsp;</p>
                  <p style="margin-top:0em;margin-bottom:1em;" >&nbsp;</p>
                  <p style="margin-top:0em;margin-bottom:1em;" >&nbsp;</p>
                  <p style="margin-top:0em;margin-bottom:1em;" >&nbsp;</p>
                  <p style="margin-top:0em;margin-bottom:1em;" ><span><br />
</span></p>                </td>
              </tr>
            </tbody>
          </table>        
          <a href="http://pc.createsend1.com/t/r/u/djlyxd/l/b/"><span style="font-size:14px;font-family:georgia, palatino;" ><em>Click here to unsubscribe instantly</em></span></a> &nbsp;&nbsp;&nbsp;</p></td>
      </tr>
    </tbody>
  </table>
</body>
</html>
Alex I., 4 years ago

Could it be links such as; http://pc.createsend1.com/t/r/l/djlyxd/l/t/ ?

Just a theory.

purplecircle, 4 years ago

Those are CM-generated links so I doubt it.

I can import the campaign as HTML, ignore the javascript errors and it works fine - is there any particular reason I can't do the same when trying to import the HTML as a template?

roshodgekiss roshodgekiss, 4 years ago

Hi purplecircle, from the code above, it looks like you're trying to that import code from a campaign that was previously imported into the app. To clarify, email templates have to be marked up using our template tag language in order to be used as templates in the email editor. Once you convert the code for use in our email editor (and import your own images, too), you shouldn't have any issues on import. Here's a little more info on creating templates.

This is a rather unusual error to be thrown for this kind of situation, so we'll certainly look into what's happened here. Please let us know if you come across any more strange errors, or if we can assist with your templates :)


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
purplecircle, 4 years ago

That code was what CM generated after importing and ignoring the Javascript errors. Original code I was trying to import below:

<style type="text/css">
<!--
.style1 {
    font-family: georgia, palatino;
    font-size: 14px;
}
-->
</style>
<body>
  <table border="0">
    <tbody>
      <tr>
        <td width="32" align="left">&nbsp;</td>
      </tr>
    </tbody>
  </table>
  <table id="Table_01" style="width: 595px;" border="0" cellspacing="0" cellpadding="0" align="center">
    <tbody>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><a href="http://www.purplecircle.co.uk/" target="_blank"><img editable="true" style="display: block;  border: 0px solid #000000; padding: 0pt; margin: 0pt;" src="http://www.purplecircle.co.uk/folio/Bewilderwood_webstudy_00.jpg" width="595" border="0" alt="Purple Circle | Design + Digital | Our project of the month for November is the BeWILDerwood website"  /></a></td>
      <tr>
        <td>
            <a href="http://www.bewilderwood.co.uk/"><img editable="true" style="display: block;  border: 0px solid #000000; padding: 0pt; margin: 0pt;"  src="http://www.purplecircle.co.uk/folio/Bewilderwood_webstudy_01.jpg" width="595" height="213" alt="" /></a></td>
    </tr>
    <tr>
        <td>
            <a href="http://www.bewilderwood.co.uk/"><img editable="true" style="display: block;  border: 0px solid #000000; padding: 0pt; margin: 0pt;"  src="http://www.purplecircle.co.uk/folio/Bewilderwood_webstudy_02.jpg" width="595" height="428" alt="" /></a></td>
    </tr>
    <tr>
        <td>
            <a href="http://www.bewilderwood.co.uk/plan-your-visit/"><img editable="true" style="display: block;  border: 0px solid #000000; padding: 0pt; margin: 0pt;"  src="http://www.purplecircle.co.uk/folio/Bewilderwood_webstudy_03.jpg" width="595" height="426" alt="" /></a></td>
    </tr>
    <tr>
        <td>
            <a href="http://www.bewilderwood.co.uk/"><img editable="true" style="display: block;  border: 0px solid #000000; padding: 0pt; margin: 0pt;" src="http://www.purplecircle.co.uk/folio/Bewilderwood_webstudy_04.jpg" width="595" height="428" alt="" /></a></td>
    </tr>
    <tr>
        <td>
            <a href="http://www.bewilderwood.co.uk/more/blog/"><img editable="true" style="display: block;  border: 0px solid #000000; padding: 0pt; margin: 0pt;"  src="http://www.purplecircle.co.uk/folio/Bewilderwood_webstudy_05.jpg" width="595" height="429" alt="" /></a></td>
    </tr>
    <tr>
        <td>
            <a href="http://www.bewilderwood.co.uk/explore/meet-the-characters/"><img editable="true" style="display: block;  border: 0px solid #000000; padding: 0pt; margin: 0pt;"  src="http://www.purplecircle.co.uk/folio/Bewilderwood_webstudy_06.jpg" width="595" height="429" alt="" /></a></td>
    </tr>
    <tr>
        <td>
            <a href="http://www.bewilderwood.co.uk/"><img editable="true"  style="display: block;  border: 0px solid #000000; padding: 0pt; margin: 0pt;"  src="http://www.purplecircle.co.uk/folio/Bewilderwood_webstudy_07.jpg" width="595" height="214" alt="" /></a></td>
    </tr>
    </tbody>
  </table>
  <table style="width: 595px;" border="0" cellspacing="0" cellpadding="0" align="center" bordercolor="#000000">
    <tbody>
      <tr valign="top">
        <td width="540" bgcolor="#ffffff">
          <multiline label='Main copy'><p style="margin-top: 0em; margin-bottom: 1em;"><span style="font-family: georgia,palatino; font-size: 14px;"><br>
          The previous BeWILDerwood website began life when the Norfolk based adventure park opened in 2007 and as we all know, online behaviour has changed  dramatically since then.</span></p>
          <p class="style1" style="margin-top: 0em; margin-bottom: 1em;">BeWILDerwood customers are many times more likley to visit the website from an iPad or mobile device than the average and most are visitors to the region. The new site needed to reflect this demographic and create a web presence that was simple and fast to use, but still retained the traditional friendly face it's known for.</p>
          <p class="style1">The result? You can whizz all over the site faster, buy tickets much faster (without needing to print them out if you don't have a printer with you) and buy merchandise much, much faster.</p>
          <p class="style1">And it's been a huge success according to BeWILDerwood Director Simon Egan when he said '&quot;Wow, the website looks mighty magnificent. In general - woaaaah !!!&quot;</p>
          <p class="style1">Enough said!</p>
          <p style="margin-top: 0em; margin-bottom: 1em;"><span style="font-size: 14px; font-family: georgia, palatino;">To talk about reinvigorating the design and writing for your internal and external communications, drop by at Howard Street whenever your heart desires or give us a call:</span><span style="font-size: 14px; font-family: georgia, palatino;"></span><span style="font-size: 14px; font-family: georgia,palatino;"><br />
             </span></p>
          <p style="margin-top: 0em; margin-bottom: 1em;"><span style="font-size: 14px; font-family: georgia,palatino;"><em>Managing Director Michael is on 0115 9084 171 or <a style="text-decoration: underline !important; color: #656566 !important;" onMouseOver="this.style.background='#FFFF00'" onMouseOut="this.style.background='#FFFFFF'" href="mailto:michael.slack@purplecircle.co.uk" target="_blank">michael.slack@purplecircle.co.uk</a> </em></span></p>
          <p style="margin-top: 0em; margin-bottom: 1em;"><span style="font-size: 14px; font-family: georgia,palatino;"><em>Director of Brands John Lyle is on 0115 9084 172 or <a style="text-decoration: underline !important; color: #656566 !important;" onMouseOver="this.style.background='#FFFF00'" onMouseOut="this.style.background='#FFFFFF'" href="mailto:john.lyle@purplecircle.co.uk" target="_blank">john.lyle@purplecircle.co.uk</a> </em></span></p>
          <p style="margin-top: 0em; margin-bottom: 1em;"><span style="font-size: 14px; font-family: georgia,palatino;">Or to read John's thoughts on Berocca, The New Zealand brand, Tesco and their deadly sandwich offer and kids with iPads, visit:<em> <a style="text-decoration: underline !important; color: #656566 !important;" onMouseOver="this.style.background='#FFFF00'" onMouseOut="this.style.background='#FFFFFF'" href="http://johnnylyle.co.uk" target="_blank">http://johnnylyle.co.uk</a> </em></span></p></multiline>
          <span style="font-size: 14px; font-family: georgia,palatino;"><em>You should really 'Like' us on Facebook too - what's not to like?</em></span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><a class="sutsocialwrapped" style="text-decoration: none;" href="http://www.facebook.com/PurpleCircleDesign" target="_blank"><img style="display: block;" src="http://www.purplecircle.co.uk/wp-includes/images/facebook.png" border="0" alt="facebook.png" width="32" height="32" sutsociallink="http://www.facebook.com/PurpleCircleDesign" /></a>
          <table border="0">
            <tbody>
              <tr>
                <td width="32" align="left">
                  <p style="margin-top: 0em; margin-bottom: 1em;"><span><br />&ndash;</span></p>
                  <p style="margin-top: 0em; margin-bottom: 1em;">&nbsp;</p>
                  <p style="margin-top: 0em; margin-bottom: 1em;">&nbsp;</p>
                  <p style="margin-top: 0em; margin-bottom: 1em;">&nbsp;</p>
                  <p style="margin-top: 0em; margin-bottom: 1em;">&nbsp;</p>
                  <p style="margin-top: 0em; margin-bottom: 1em;">&nbsp;</p>
                  <p style="margin-top: 0em; margin-bottom: 1em;">&nbsp;</p>
                  <p style="margin-top: 0em; margin-bottom: 1em;"><span><br /></span></p>                </td>
              </tr>
            </tbody>
          </table>       
          <unsubscribe><span style="font-size: 14px; font-family: georgia, palatino;"><em>Click here to unsubscribe instantly</em></span></unsubscribe> &nbsp;&nbsp;&nbsp;</p></td>
      </tr>
    </tbody>
  </table>
</body>
</html>

Greg Strutton Greg Strutton, 4 years ago

Hey purplecircle,

Just had a quick skim of the code you pasted and it contains a few onMouseOver and onMouseOut attributes.  As soon as these are removed, the HTML will import just fine.

They are located within the <multiline > tag and an example is:

<p style="margin-top: 0em; margin-bottom: 1em;"><span style="font-size: 14px; font-family: georgia,palatino;"><em>Managing Director Michael is on 0115 9084 171 or <a style="text-decoration: underline !important; color: #656566 !important;" onMouseOver="this.style.background='#FFFF00'" onMouseOut="this.style.background='#FFFFFF'" href="mailto:michael.slack@purplecircle.co.uk" target="_blank">michael.slack@purplecircle.co.uk</a> </em></span></p>

Hope that helps!

purplecircle, 4 years ago

Thanks Greg, thanks for looking at the code – I didn't realise those attributes were classed as Javascript.

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098