Jump to content

Javascript not working on Business Account

Recommended Posts

Site URL: http://lavenderrightsproject.org/donate

Howdy!

I am trying to add a line of code to our donation website that was provided by Little Green Light. The iFrame version works just fine, but Java doesn't seem to be compatible at all. We have a business account, so in theory it should work, but no luck. It only keeps displaying line of code. The error appears to be centered around </script>, but I don't really understand why. Could somebody advise?

Here is the code I am trying to embed:

<script type="text/javascript" src="https://secure.lglforms.com/form_engine/s/P55eGc8aijBW_Fmx-LmCAw.js"></script><noscript><a href="https://secure.lglforms.com/form_engine/s/P55eGc8aijBW_Fmx-LmCAw">Fill out my LGL Form!</a><br/></noscript>

Thank you!

Amy

 

 

Link to comment
  • Replies 3
  • Views 1.1k
  • Created
  • Last Reply

It appears to be working to me. Assuming this is the form the code should ad?

2009734111_ScreenShot2021-05-10at5_07_31PM.thumb.png.1a7b835aec4618fcaf314dae6f0fb32e.png

 

When you are editing a page often the script code won't run so as not to interfere with editing. It's a SS feature. Generally to see the code run you need to go Full Preview or view the page using Private browsing.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Ugh! I should have made this more clear - on the live page, its the iFrame code that is working - not the Javascript. Java just shows code in preview mode or incognito mode. I took it down because its a live page, but here is a place to find it for real: https://www.lavenderrightsproject.org/newdonation

It ends up looking like the attached images though. Little Green Light says the code is working just fine. So I don't know what to do. My supervisor really wants us to be using the Java, so any support would be welcome.

 

 

Screen Shot 2021-05-11 at 10.53.01 AM.png

Screen Shot 2021-05-11 at 10.52.43 AM.png

Link to comment
2 hours ago, LRPTech said:

It ends up looking like the attached images though. Little Green Light says the code is working just fine. So I don't know what to do. My supervisor really wants us to be using the Java, so any support would be welcome.

To avoid confusion, the code you want to add is in a JavaScript file, not Java. That's a completely different programming language.

When you are trying to load a JavaScript file, you must choose the 'HTML' mode in the Code Block, not JavaScript. This is because the <script> tags are actually HTML. If you choose JavaScript, the "Display Source Code" option is forced "on", which is why you can see the code displayed on the page.

I hope this makes sense.

About me: I'm Paul, a SQSP user for over 18 yrs and a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji below. Buying a coffee is optional.

Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.