I am facing a problem with including a file badge code for another website, the code is as follows:
<script type="text/javascript" id="ngos-ed-on-file-widget-script-17336c1f-917d-492b-bc53-225c95e103da">
(function() {
function async_load()
{ var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; var theUrl = 'http://www.ngosource.org/sites/default/files/ngos_ed_on_file_widget.js'; s.src = theUrl + ( theUrl.indexOf("?") >= 0 ? "&" : "?") + 'ref=' + encodeURIComponent(window.location.href); var embedder = document.getElementById('ngos-ed-on-file-widget-script-17336c1f-917d-492b-bc53-225c95e103da'); embedder.parentNode.insertBefore(s, embedder); }
if (window.attachEvent)
window.attachEvent('onload', async_load);
else
window.addEventListener('load', async_load, false);
})();
</script>
When I uploaded this code on the code-injection tool on my website it showed me a syntax error- so I followed the instructions below:
To add JavaScript to a code injection field, surround the code with <script></script> tags.
And it kind of worked- as in it appeared on the website but in a text form- see picture for reference.
Could you please help as to how to solve this issue? Also, if I'd want this code to appear in like the middle of the page instead of the footer how can I do it?
Question
MEDEWELL
Site URL: https://rose-bellflower-zcdd.squarespace.com/config/settings/advanced/code-injection
Hello there!
I am facing a problem with including a file badge code for another website, the code is as follows:
When I uploaded this code on the code-injection tool on my website it showed me a syntax error- so I followed the instructions below:
And it kind of worked- as in it appeared on the website but in a text form- see picture for reference.
Could you please help as to how to solve this issue? Also, if I'd want this code to appear in like the middle of the page instead of the footer how can I do it?
Thanks!
Link to comment
Top Posters For This Question
8
11
Popular Days
Jul 1
3
Jul 18
2
Jul 11
2
Jul 12
2
Top Posters For This Question
tuanphan 8 posts
MEDEWELL 11 posts
Popular Days
Jul 1 2022
3 posts
Jul 18 2022
2 posts
Jul 11 2022
2 posts
Jul 12 2022
2 posts
Posted Images
18 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment