â–¼
Streaming live at 10am (PST)

"var Webflow" visible at bottom of page


#1

Hi,

I've found an odd bug in one of my pages that seem difficult to get rid of. On http://fikk.se/frivillig, hosted on WebFlow, if you scroll all the way down, you will see the following JS snippet right underneath the footer:

var Webflow = Webflow || []; Webflow.push(function() { // === Custom Form Handling === // unbind webflow form handling $(document).off('submit'); // new form handling $('form').submit(function(evt) { evt.preventDefault(); alert("Your custom action here"); }); });

This is not encapsulated in a <script> tag but has simply been injected directly underneath the <body> element. The only unorthodox thing done to this page is an HTML Embed, but it's only embedding an iframe so I can't imagine it affecting things:

<iframe 
  src="https://app.fikk.se/embed/new" 
  height="1300px" 
  border="0" 
  frameBorder="0" 
  seamless="seamless" 
  width="100%"
></iframe>

The snippet is not visible when in the Designer, and republishing doesn't help.

Does anyone have any idea what this could be and what can be done about it? I'm lost. Thanks in advance!


#2

Tjena :smiley:

Can I have a designer preview link and take a look?


#3

Anything inserted wrongly will come out as plain text on the page. I'm guessing you need to add <script> and </script> to that code.


#4

Hi @bjornlll

Thanks for posting about this. I think @jorn is correct– you are seeing the snippet on the live site because it is missing <script> </script>.

The reason you don't see the snippet in the Designer is because custom code rarely renders in the Designer. It typically will only render on the published site.

However, it is difficult to say exactly the cause without seeing the site. Can you please share your Read-Only link? :slight_smile:

https://help.webflow.com/article/how-do-i-share-my-sites-read-only-link


#5

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.