title: JavaScript error when using Highcharts
body: <p>I am having a weird problem that I hope you can help me with.</p>
  
  <p>I have <a href="http://www.highcharts.com/" rel="noreferrer">Highcharts</a> running on a dev website -- I use a simple form to allow the user to enter data.</p>
  
  <p>On the same page, a Highchart shows once data is entered.</p>
  
  <p>The data entry form has very simple jQuery-based snippets, eg. form validation, a counter for max number of characters, etc.</p>
  
  <p>What happens is that when there is chart data in the database, the chart plots correctly, and the remaining JS snippets work as expected wen you try to enter new datapoints.</p>
  
  <p>But if there is no data in the database (therefore no Highchart is shown), all my JS snippets stop working.</p>
  
  <p>On Firebug console, I get this error when there is no data to form a chart:</p>
  
  <pre><code>jb is null
  function n(m,h){kc=ya(a.title,m);tc=ya...play:""});Aa.body.appendChild(Qb)}Tc=
  highcharts.js (line 47)
  </code></pre>
  
  <p>On Chrome, a different error shows as </p>
  
  <pre><code>Uncaught TypeError: Cannot set property 'innerHTML' of null
  d.d.extend._Deferred.f.resolveWith         jquery.min.js:16
  d.d.extend.ready                           jquery.min.js:16
  d.c.addEventListener.A
  </code></pre>
  
  <p>Again, these errors disappear as soon as I enter the first data point and a chart is formed.</p>
  
  <p>Does anyone know what is happening and how I can get my JS to work when a Highchart is empty?</p>
  
  <p>Any pointers are much appreciated. Thanks!</p>