1 Answer

0 votes

A JavaScript file can be added to each page of your questionnaire by adding HTML like this to your questionnaire's HTML head tag:

<script src="myfile.js"></script>

In theory, you could put the URL of a .js file in there and be good to go, but I feel hesitant to ship a questionnaire like that just in case something goes wrong with the server hosting that URL. I prefer to download the .js file to my computer and place it in my questionnaire's graphics folder and then reference it like this:

<script src="[% GraphicsPath() %]myfile.js"></script>

Of course, different libraries may come with different licensing rules. Be sure to comply with the rules of use for any library you are interested in adding to your questionnaire.