Jump to content

JavaScript not showing on website

Go to solution Solved by paul2009,

Recommended Posts

Hi, 

Please help - I've added some javascript to a code block on a page in our website (site is not live so is password protected). The code has apparently been tested in SquareSpace by the supplier and they've confirmed it works - but I can't get it to work. No matter what I do the page is blank when I view it when logged out of admin. We are on a business plan. Any ideas - could it be a setting in our site that I need to change? 

This is the javascript:

 

<script type="text/javascript">
window.onload = function () {
var wd_iframeWin = document.getElementById("wd_ediary_iframe").contentWindow;
wd_iframeWin.postMessage(JSON.stringify({"browser_url": window.top.location.href}), "*");
};
</script>

<script src=https://ocucowebdiary.net/widget?key=08118c918c4fd5de15ffc2cfa337ebde&type=js&clear=1></script>

Thanks

Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution
On 2/9/2023 at 10:53 AM, Blink said:

I've added some javascript to a code block. The code has apparently been tested in SquareSpace by the supplier and they've confirmed it works - but I can't get it to work.

The code is at fault. I recommend that you contact the supplier directly and ask them to help you resolve this.

Edited by paul2009

About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.