Jump to content

Script disabled when trying to HTTP request

Recommended Posts

Hey everyone! 

I'm currently trying to add an HTML/JavaScript code block that allows a page to make API calls/HTTP requests.

I've attached a simple HTML file screenshot with all the code I'm trying to add to the code block. This HTML file, when opened on chrome, successfully queries the API using JavaScript 'fetch' and receives a response which is added to a table and displayed in HTML.

Unfortunately when copied on the Squarespace code block, I get a script disabled message on the editing page and then a fetch failed when viewing the page normally.

Any help would be greatly appreciated, let me know if any further clarification is needed! Thank you!

image.thumb.png.5faad7018c45d94bbfd24658a89d0be8.png

Link to comment
  • 1 year later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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.