Copy link to clipboard
Copied
CP 9.0.2.437
HTML5 Output only
Hello,
I want to use an external java library.
I have it working successfully by putting a reference to it in my index.html file.
<script src="../../java_library/my_java_library.js"></script>
However, I would rather be able to reference the library from within the project.
I found the code below in the forum and have placed it in the 'On Enter' action of the first slide.
Unfortunately it did not work, even by using either relative or absolute addressing.
$(‘body’).append(‘<script src=”http://myservername/myfolder/mylibrary.js” async=”false”></script>’);
If anyone can suggest where I am going wrong I would appreciate it.
Thank you
Peter
Check out this thread. One of these will surely work.
Copy link to clipboard
Copied
You can't use that example literally, it doesn't exist.
If I had a js file to link on my site it could be:
$(‘body’).append(‘<script src=”https://www.tlcmediadesign.com/scripts/cp.js" async=”false”></script>’);
You need to put the path to your file.
Copy link to clipboard
Copied
TLC,
Thank you for the feedback.
In my original post I removed the real server/folder/file path information as that is sensitive, and I replaced it with the dummy code.
So I am using a script exactly as you have suggested, but the it does not work.
Peter.
Copy link to clipboard
Copied
Check out this thread. One of these will surely work.
Copy link to clipboard
Copied
TLC,
I have had a quick look at the thread and it appears to have some good tips, I will try them out.
Thank you for the suggestion.
Peter