title: Using an HTML button to call a JavaScript function
body: <p>I am trying to use an HTML button to call a JavaScript function.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>&lt;input type="button" value="Capacity Chart" onclick="CapacityChart();"&gt;
  </code></pre>
  
  <p>It doesn't seem to work correctly though. Is there a better way to do this?</p>
  
  <p>Here is the link:<a href="http://projectpath.ideapeoplesite.com/bendel/toolscalculators.html" rel="noreferrer">http://projectpath.ideapeoplesite.com/bendel/toolscalculators.html</a> click on the capacity tab in the bottom left section. The button should generate an alert if the values are not changed and should produce a chart if you enter values.</p>