If you’re loading your page via
file:, then protocol-relative URLs aren’t going to work. The script tag has:
This should be changed to:
I have a certification and a badge provided by Acclaim. I want to embed it in my personal website but it’s not working. here’s the code they provided:
<div data-iframe-width="150" data-iframe-height="270" data-share-badge-id="60615e70-6409-4752-9d77-3553a43d13d2" data-share-badge-host="https://www.youracclaim.com"></div>
but even when simply put onto an empty html:5 page, I get the error:
Loading failed for the <script> with source “file:///assets/utilities/embed.js”.
What’s the problem here? I’m not sure how Acclaim can provide a ready-to-paste script that’s just simply not working, nothing shows up on the website. I’m guessing the problem is at the
src... part, but don’t know how to fix it.
@j08691 thank you for pointing that out. While checking through that .js file I found that it replaces the
@Chris No, you’re not understanding it. As I mentioned in my answer, this is basically relative to the protocol in-use. They’ve assumed you’re going to use
@Brad I have modified it exactly as in your answer and I get the error seen in my first comment. The replaced (by the embed.js file) div has the following code: