title: How to reference external javascript files from a SharePoint 2010 Content Editor Web Part
body: <p>I'm trying to set up a basic HighCharts example using a SharePoint 2010 Content Editor Web Part, but I get the error message <strong>"Object doesn't support property or method 'highcharts'"</strong>. I'm using the example content directly from the highcharts download. For some reason, the script at the top of the code is not being loaded or I'm not able to access it. I'm guessing that it has something to do with the way sharepoint loads other scripts, but I'm not sure.</p>
  
  <pre><code>&lt;script src="https://teamOne.com/sites/sandbox/mmg/christo/Shared%20Documents/HiChartsApp/js/jquery-1.11.3.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://teamOne.com/sites/sandbox/mmg/christo/Shared%20Documents/HiChartsApp/js/highcharts.src.js"&gt;&lt;/script&gt;
  
  &lt;div id="charts_holder"&gt;
  &lt;h2&gt;HiCharts Test Page&lt;/h2&gt;
  &lt;p&gt;This is where the charts live&lt;/p&gt;
  &lt;/div&gt;
  
  
  &lt;div id="container" style="width:100%; height:400px;"&gt;&lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function () { 
      $('#container').highcharts({
        chart: {
          type: 'bar'
        },
        title: {
          text: 'Fruit Consumption'
        },
        xAxis: {
          categories: ['Apples', 'Bananas', 'Oranges']
        },
        yAxis: {
          title: {
              text: 'Fruit eaten'
          }
        },
        series: [{
          name: 'Jane',
          data: [1, 0, 4]
        }, {
          name: 'John',
          data: [5, 7, 3]
        }]
    });
  });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I haven't had much luck with Sharepoint loading other JS files from a content editor web part, but I'm hoping someone will have a good suggestion. Thanks in advance!</p>