Using JS from github in HTML questions.

  • Hello I am having trouble using code from github in HTML questions.

    For simplicity, I would like to use code from

    I cannot seem to get the game to display at all, I would think if I just link to the source files at the start of the JavaScript it should run, unfortunately it does not.  I am finding this is happening with nearly all JS files I link to.

    Any ideas?


  • Hello Mark, as far as I am aware you will need to call the scripts as part of the Question HTML, but the source location needs to be pointing to the full path of the scripts as located on the server.

    Or you could just put the codes from the JS files into the Question JavaScript field.

  • administrators

    @mschneider did you manage to get this working. If not, let me know and I'll help you fix it.

  • @jmtrik I have been completely unsuccessful with loading js from external sources..

    For example I am trying to load the following small bits of code....  In either the main question window, or if needed, in the HTML Response Type.  It seems the external external source is not loading?


    <html lang="en">

      <title>Plotting functions in JavaScript using the 
        function plot library</title>
      <meta charset="utf-8"/>

    <!-- I had to break the tags below as the page will not allow html code with a script tag, in other words pI would need to add the needed opening and closing script tags on both of the external sources below-->
    script src="
    script src=""

    <!-- repair the tags above -->

      <div id="myFunction"></div>


    div {

      float: left;

    #myFunction {
      padding: 25px;
      width: 250px;
      height: 250px;


    var parameters = {

      target: '#myFunction',
      data: [{
        fn: 'sin(x)', 
        color: 'red'
    } ,
        fn: 'cos(x)', 
        color: 'blue'
      grid: true,
      yAxis: {domain: [-1, 1]},
      xAxis: {domain: [0, 2*Math.PI]}


Log in to reply