RealTimeDesigner Support Network
Wiki Forums Libraries Docs Support RealTimeDesigner Home
Welcome! Log In Create A New Profile

Advanced

Add external JavaScript file via CDN

Posted by danielc 
Add external JavaScript file via CDN
March 23, 2017 08:49AM
Hi Alex!

I was wondering which would be the best way to add an external JavaScript file like for example: https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js' in the RTD designer page. I tried to add it dynamically but that didn't work. I was thinking that maybe GenerateImportCode API call could work but I think the custom_js is inserted inline.

Thanks for your help!
Re: Add external JavaScript file via CDN
March 23, 2017 12:39PM
You mean add JS to the RTD designer?
If that's the case, I would simply put this in the FOOTER CODE FOR DESIGNER section of your Stores Setup:
<script src="myscripts.js"></script>
And if you'll need to fire something on full load, you can use the function described here:
http://support.realtimedesigner.com/forum/read.php?1,5368
Sorry, only registered users may post in this forum.

Click here to login