Jump to content

Use Java to Load HTML File in Code Block

Recommended Posts

Is there a way to use Java to tell a code block to load the contents of an HTML file already uploaded to squarespace? This solution is needed to be able to make a change to one file that could apply across hundreds of blog posts at the same time.

When I used an iframe and put the source url in the code block to the file, squarespace simply downloads the file every time the page is loaded instead of displaying the content in the file, which is why I thought Java was the solution.

Link to comment
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

6 minutes ago, noahawaii said:

Is there a way to use Java to tell a code block to load the contents of an HTML file already uploaded to squarespace?

Can you tell us the problem you are trying to solve? Why do you need to load something? What is it for?

A link to the page on the site will also help the community to provide an answer.

By the way, I think you're referring to JavaScript. Java is an entirely different programming language.

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation 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.

Buy me a coffee

Link to comment
12 minutes ago, paul2009 said:

Can you tell us the problem you are trying to solve? Why do you need to load something? What is it for?

A link to the page on the site will also help the community to provide an answer.

By the way, I think you're referring to JavaScript. Java is an entirely different programming language.

Yes I am referring to javascript. My website is in there, but I don't think it's useful for this kind of solution. 

I need to load the html contents of an html file within a code block, and I figured javascript would be the best solution.

Edited by noahawaii
Link to comment
  • 1 month later...

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.