Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by JamesJ

  1. Thanks for the response method. I did try this code to read the following simple json file. I uploaded the file to the squarespace site rather than trying to call it from google drive. <script> fetch('https://www.waileage.org/s/testdata.json') .then(response => response.json()) .then(data => console.log(data)); document.getElementById("container").innerHTML = data; </script> json file = [ ['apple', 'fruit', 'red'], ['pear', 'fruit', 'yellow'], ['carrot', 'vegetable', 'orange'], ['eggplant', 'vegetable', 'purple'] ]
  2. I am attempting to set an array equal to an external JSON file. I put the JSON file on google drive and set it to share. I have tried many different examples of code to get the JSON data into the array, but I am stymied. Thanks for any help.
  3. Fantastic! Thanks bangank36! That did the trick.
  4. Site URL: https://www.waileage.org/test I have attempted to freeze the top row and first column in the table generated from javascript. I have tried editing the css and javascript to force the top row and first column not to scroll, but without success. I looked through the forum, but couldn't find anything related to the problem I am encountering. Any suggestions would be greatly appreciated. Thanks.
  5. Thanks tuanphan and creedon! Worked perfectly.
  6. Hi tuanphan, Thanks for offering to take a look at the site. This is the page - https://www.waileage.org/test. The code block is above the text on the page, but nothing is displayed. Kind regards, James
  7. I am trying to get a simple javascript array to pass to a squarespace page, but everything I have tried has not worked. Here is the latest code I attempted. I put the script in the Advanced code section for the page, and the HTML in a code section on the page. I can't get anything to display. I am using squarespace 7.1. Any help would be greatly appreciated. Thanks! in advanced code section... <script> var array = ['apple','ball']; document.getElementById('content').innerHTML = array.toString(); </script> in code section on page <div id="content"></div>
  • 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.