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

Script not running on initial load

Question

Posted (edited)

I recently switched from the Peak template to the Impact template. I have three forms that are managed through a script that sends the data back to our donor manage system coded into the page. The script loaded and functioned perfectly on the Peak template, but now that I have switched to the Impact template, the scripts won't run on initial load. You actually have to reload the page to get the form to show up. Since the same script worked on the old template as well as on the new template once the page is reloaded, it seems pretty obvious to me that there is some kind of error in the code base for the Impact template that is not executing the script on initial load. Jessii from Squarespace has been giving me the runaround all week, insisting that the problem has to be with the script, when it clearly isn't. Anyone out there have any idea what else I can do on my end to encourage the script to load? (Or alternatively, to reach someone at Squarespace who can actually aid me with this problem?)

Edited by TrinityWeb
Initial Revision

Share this post


Link to post

1 answer to this question

Recommended Posts

  • 1

Hi.

First let me explain why Squarespace support can't help in your circumstances. Their remit is limited to support of their own product; they don't troubleshoot code that you've added.

I can't confirm the exact cause of your issue without the URL of your site or the code that you've used, but I'd say, with a high degree of certainty, that it your code isn't Ajax (asynchronous JavaScript and XML) compatible.

Peak is an old, now discontinued template, that pre-dates Ajax, but Impact is part of the newest template family (Brine) and it does use Ajax. I've written a longer explanation about Ajax on Squarespace here:

https://sf.digital/squarespace-solutions/why-doesnt-my-code-work-until-i-refresh-the-page

-Paul

Squarespace Expert & Professional Developer


If a response has helped you, please give thanks using the  like-20-mag.png.3997345d620e40b4760b5d7a667cad54.png button.
Need personalised help? I'm a professional Developer who works with Designers internationally. You can book me via my company's website. www.sf.digital

Share this post


Link to post

Create an account or sign in to comment

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


×
×
  • Create New...