LRPTech Posted May 10, 2021 Share Posted May 10, 2021 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
creedon Posted May 11, 2021 Share Posted May 11, 2021 It appears to be working to me. Assuming this is the form the code should ad? 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
LRPTech Posted May 11, 2021 Author Share Posted May 11, 2021 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. Link to comment
paul2009 Posted May 11, 2021 Share Posted May 11, 2021 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. Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide 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. Buying a coffee is generous but optional. Would you like your customers to be able to mark their favourite products in your Squarespace store? Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.