title: Why won't this html segment recognice my javascript function
body: <p>I am rendering a graph with a couple of input fields using a function in WordPress. The js file is definitely available to this section of the html because the graph is rendering. It is included through the enqueue_script function in wp. However, when I try to set the onclick function (updateChart()), I get an error saying my function isn't defined. Been at it for a while... Any ideas?</p>
  
  <p>I have tried importing the script directl into the head above the tags I am trying to call it in.</p>
  
  <pre><code>        ob_start();?&gt;
  
      &lt;head&gt;
              &lt;!–– All styling should take place below ––&gt;
                  &lt;!–– First div id must match the first argument of Chart Object in js file ––&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id='chartContainer' style='height: 300px; width: 100%;'&gt;&lt;/div&gt;
          &lt;input type='number' id='voltage' placeholder='Voltage' step='0.01' /&gt;
          &lt;input type='number' id='amperage' placeholder='Amperage' step='0.01' /&gt;
          &lt;button id ='simulate' onclick= 'updateChart()' &gt;Simulate&lt;/button&gt;
      &lt;/body&gt;
  
  &lt;?php
          $content = ob_get_clean();
          echo($content);
      }
  </code></pre>
  
  <p>The js code should get the input fields and update the chart using them.</p>