Jump to content

Can't seem to solve for "Scripts Disabled" when attempting to embed a widget via a Code Block on a page.

Recommended Posts

Hello --

Hoping someone may be able to help me with getting a web widget to appear. Code provided below. 

Each time I save the page with the code block, I'm getting the "Scripts Disabled" error. I've done everything I've read to do, and still can't get the web widget to populate (it's just showing as blank). 

Steps to try and resolve the issue:

  • added the code to the "header section" of the code injection page 
  • Made sure code was tied to proper libraries 
  • Open an private browsing tab to view the webpage 

Here is the code for the widget I am working with. Any help getting this to work is greatly appreciated.

<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://unpkg.com/@openai/chat-widget@latest/dist/chat-widget.js"></script>

<div id="chat-widget-container"></div>

  var chatWidget = new ChatWidget({
    apiKey: 'YOUR_API_KEY', // Replace with your own API key
    targetElement: '#chat-widget-container',
    prompt: 'Welcome to the resume formatting tool! Please input a sentence from your resume, and I will suggest ways to improve its formatting.',
    inputPlaceholder: 'Enter a sentence from your resume...',


Screen Shot 2022-12-13 at 8.02.06 AM.png

Screen Shot 2022-12-13 at 8.02.28 AM.png

Link to comment
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

18 minutes ago, natemonseu said:

Each time I save the page with the code block, I'm getting the "Scripts Disabled" error.

I'm assuming that you added a genuine API KEY after taking the screenshots? If yes, please include a working link to the page so we can see the code in action. If you're unsure how to do this, please see How to Post a Forum Question.

Did this help? Please give feedback by clicking an icon below  ⬇️

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.