Page 1 of 1

inserting HTML code snipped from Mail Chimp

Posted: Wed Mar 02, 2022 10:49 pm
by wmdino
Hello all,

I am a novice webbuilder and am trying to help our local arts society. I created their website but they would like to link their newsletter stored in folders on Mail Chimp.

Mail Chimp provides the following (example) snipped of code to do this...

---------------------------

<style type="text/css">
<!--
.display_archive {font-family: arial,verdana; font-size: 12px;}
.campaign {line-height: 125%; margin: 5px;}
//-->
</style>
<script language="javascript" src="//porganarts.us9.list-manage.com/generate-js/?u=273b9589750bf8a31e572df48&fid=28849&show=10" type="text/javascript"></script>

---------------------

I created an HTML Layout grid and inserted the above code and did a preview (didn't publish) and it takes a very long time for the browser to open and nothing comes up. I am not sure what I expected, but I didn't expect a blank screen.

Am I doing this completely wrong? Can anyone offer any advice?

Thanks in advance,
- Bill

Re: inserting HTML code snipped from Mail Chimp

Posted: Thu Mar 03, 2022 3:32 am
by BaconFries
How are you trying to insert the code? When inserting code it needs to be inserted correctly. In your example the <style></style> part should be placed between the <head>placed here</head> tags. The same can be applied to the javascript but in some instances it may be required to be inserted at the end between <body>placed here</body>.

You can also try using the HTML Object for the javascript and as for the css as mentioned and see what works or not. Note you may need to publish rather than use Preview às it may be a requirement of the script to work.

Re: inserting HTML code snipped from Mail Chimp

Posted: Thu Mar 03, 2022 7:39 am
by Pablo
I created an HTML Layout grid and inserted the above code and did a preview (didn't publish) and it takes a very long time for the browser to open and nothing comes up.
It looks like the script assumes that is used on a server, so it will probably not work in local preview.
Because the URL of the script has no prefix:

Code: Select all

//porganarts.us9.list-manage.com
Note that the code will be inserted "AS IS". So, if it does not work then either the script is incorrect, incomplete or it conflicts with other code on the page.