- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Embed Code JavaScript Issue
When I use an embed code block for custom HTML with the following JavaScript in the footer, the page goes white, and I have to exit the editor to get the page back, only to see that the entire embed code block is blank.
<script>document.write(new Date().getFullYear())</script>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report

- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Hi @chrisbowyer Someone may be able to help you out with this, but can you provide your full url and the code you are using in the embed code element? Thanks!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
https://www.engadinetavern.com.au/
This works
<p><small>Copyright © 2018-2019 Engadine Tavern. ABN: 26 715 894 612. All rights reserved. Web Developer: <a href="https://www.chrisbowyer.com.au/" target="_blank" rel="noopener noreferrer">Chris Bowyer</a> - <a href="https://www.portaldomains.com.au/" target="_blank" rel="noopener noreferrer">Portal Domains</a></small></p>
This doesn't
<p><small>Copyright © 2018-<script>document.write(new Date().getFullYear())</script> Engadine Tavern. ABN: 26 715 894 612. All rights reserved. Web Developer: <a href="https://www.chrisbowyer.com.au/" target="_blank" rel="noopener noreferrer">Chris Bowyer</a> - <a href="https://www.portaldomains.com.au/" target="_blank" rel="noopener noreferrer">Portal Domains</a></small></p>
The only difference being the first uses
2019
and the second uses
<script>document.write(new Date().getFullYear())</script>
just plain old vanilla JavaScript
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report

- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Thanks for posting.
@BJ Do you have any thoughts?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report

- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Some code may potentially cause issues within the editor, depending on how it works. You might want to consult with a Javascript developer so they can take a look, since that would be beyond the kind of support we can provide.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report