Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Code Blocks and Javascript on site in development




I'm a Squarespace noob.
1. The objective: to populate a Squarespace page with data/html from a backend system, using Ajax.
2. Testing javascript: I've created a Code Block on a page, and added some simple, vanilla javascript:
<div id="displayDiv"></div>
<script type="javascript">
document.getElementById("displayDiv").innerHTML ="<h2>Omkara's lab block</h2>";
3. As expected I get a "Embedded scripts" for the block and are asked to "view in safe mode"
4. Once I enter safe preview mode I am (as expected) told to log out and view the page

However, once logged out I can not view the page as the site is in development and hence not published!
What am I missing here?

Also, if anyone knows of other waya to include data from another system without using Ajax (which may cause issues), it would be cool to know about them



Link to post
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

1 answer to this question

Recommended Posts

Create an account or sign in to comment

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

  • Create New...