Link to external JavaScript file

Link to external JavaScript file

by Matt Crosslin -
Number of replies: 1
Is it possible to link to an external JavaScript file in a Book page?  The JS file is uploaded in the File section of Module, in a folder called "includes." 

I know there are other ways of doing this (inserting outside information), but this is the method my school has choosen.  My school uses one JavaScript file to supply some basic information to all the pages in one course, and it would be great to be able to use that information in a Book page.  And to use some of the functions that have been written into that JS file.
Average of ratings: -
In reply to Matt Crosslin

Re: Link to external JavaScript file

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Matt,

For security reasons, JavaScript tags are not allowed in Moodle. The list of allowed tags may be found in /lib/weblib.php.