Donation button script not integrating successfully

Hi there Webflow Gurus!

I’m trying to install a third party widget (built in java) into my site to manage non-profit donations, but I’m having trouble successfully integrating it into my site. You can find my preview link here. Specifically, look at the /donate page, which demonstrates the problem I’m encountering. This screenshot just shows that the code isn’t rendering on the final site - It’s in a div block with a color wash over it just as a visual placeholder.

The widget is built by Artful.ly, and comprises of a script that lives in the head tag, and a simple HTML embed that lives in the body of the site that calls the script. My knowledge of java is limited, as is my understanding of integrating it into HTML/CSS.

I was previously able to get the widget to render on the final site, but since trying to style the forms with inline CSS, I broke the functionality. Since then, repeating the steps that (I believe) got it to work properly the first time returned no results - only a blank div block!

It’s essentially a form input and a button that confirms the donation. This third party script has a “drawer” of sorts that slides up from the bottom of the window to complete checkout.

As for the code itself, this is in the page-specific “custom code” section, inside the head tag.

<script src='//artfully-herokuapp-com.global.ssl.fastly.net/assets/artfully-v3.js' type='text/javascript'></script>

In my HTML embed element on the canvas, I just have:

<div id='donation'></div>

Any suggestions or tips on how to solve this problem? Is it a compiling issue? Syntax? Is there another step I need to take with Webflow to get it to render properly? Any help is hugely appreciated.

Additionally, the next step would be styling these external elements with CSS without breaking the script!

Thanks,

Max

Hi @maxlab,

Can you try to add this script on the the top head of the page please ?
Publish it and tell me

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js' type='text/javascript'></script>

@zbrah

That doesn’t look like it did anything, but just now, upon publishing, I realized that I had an “Insecure Content Blocked” Badge in my chrome address bar:

07%20PM

Upon turning that off, the site switched from https to http, and the script rendered successfully. This is problematic, as the rest of the site is https, and I obviously would prefer the entire site to be secure, especially on the donate page of all pages! Is there any way to modify the script to load under https?

Thank you,

Max

@zbrah

Ah! I think I got it. I replaced

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

with

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

According to Stack Overflow,

“removing http: part from src means you don’t want to load external files/resources with fixed protocol that you are mentioning in the src, rather you want to load the external resources with the same protocol the demanding resource is residing.”

That seemed to do the trick.

If you happen to know, is it possible to style these external elements with CSS, so that they can more accurately reflect the visual style of the other fields/buttons on my site?

Thank you!

1 Like

Great to hear it works @maxlab :slight_smile:
Which part do you want to custom exactly ? Can you screen ?

Check out this page for a quick sketch of how I’d prefer it to look.

Thanks!

2 Likes

Hey @maxlab,

Ok so here is a good workflow if you want to custom it the way you want.

Download Stylizer 7 What's New In Stylizer 7 - Skybound Software (14day trial if you don’t want to pay)

Have a look at the video i’ve recorded for you.

http://www.files.zbrah.com/monosnap/screencast_2018-02-28_14-58-39.mp4

On my example i’ve just changed the background color.
You can change everything, add everything you want and seeing it visually.
If you are not familiar with css, look on the css panel properties on webflow it has everything you need !
In my example here, if you want to change the background color, just hover on the wf background color it ll tells you the css name. Then just type it in Stylizer 7

01

Hope this helps,

1 Like

Wow, this is killer. Thank you so much for taking the time to make this. I’m somewhat familiar with CSS, I just wasn’t sure if it was possible to apply a CSS style made in Webflow to these external elements. This is a great workaround.

I’ll play around with Stylizer!

Thank you again,

Max

1 Like

@maxlab Yes it is :slight_smile:
Pro tip : Add !important if you want to overwrite something
Here in Stylizer
http://www.files.zbrah.com/monosnap/desktop_1_d20dbe711126c63f6c05f87b14125fc8cda691b6.css__Stylizer_7_2018-03-01_10-58-48.png