0

I am aware that document.write should not be used in an asynchronous context, but in this case I am not really in control of that.

In the process of introducing an archive of old newsletter using mailchimp (as described here), I noticed that no archive was inserted in the page and that the reason is because the imported script uses document.write.

I couldn't find a solution in the mailchimp knowledge base, and the my current alternative is to insert each newsletter in the page by hand - which is not really nice.

How can I fix this? is there an alternative way to automatically produce a list of past newsletter on my website?

Community
  • 1
  • 1
AkiRoss
  • 11,745
  • 6
  • 59
  • 86
  • where are you putting the script? If it's included in the html source it would write before page has completely loaded and would work fine. Otherwise they have an api you should be able to get same content from – charlietfl Oct 03 '16 at 20:35
  • It is in the HTML source, as documentation suggests, in the place where I want the archive to appear. – AkiRoss Oct 03 '16 at 20:38
  • any errors thrown? – charlietfl Oct 03 '16 at 20:40
  • No, just the warning signaling that the call is being ignored. – AkiRoss Oct 03 '16 at 21:01
  • what warning ? Sounds like clues are right there. Should give you more specific detail than that – charlietfl Oct 03 '16 at 21:03
  • Sorry, probably I assumed that first link was already hinting to the fact that I am getting that warning: "Warning: A call to document.write() from an asynchronously-loaded external script was ignored". As I said, I am not in control of that, so as I include the script in the HTML, the warning is raised and nothing is rendered on the page. – AkiRoss Oct 03 '16 at 21:11

0 Answers0