title: how to call js function without event
body: <p>How can I just call a js function from within an html file, with no event trigger? I want to have code like:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  
  &lt;head&gt;
  
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="jquery.flot.js"&gt;&lt;/script&gt;
  &lt;script src="chart.js"&gt;&lt;/script&gt;
  
  &lt;title&gt;
  &lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div id="chart1" style="width:600px;height:300px"&gt;&lt;/div&gt;
  
  show_graph({{ chart_type }}, {{ data }}, {{ options }});
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>but this just results in the function call being printed to the screen, instead of the function actually being executed.</p>
  
  <p>e.g. I'm getting 
  show_graph(bar, [[1, 2000], [2, 50], [3, 400], [4, 200], [5, 5000]], ['Foo']); </p>
  
  <p>What do I do?</p>
  
  <p>EDIT:</p>
  
  <p>I appreciate the feedback, but I tried wrapping it in a script tag and got an "invalid number of parameters" error.</p>
  
  <p>the javascript is:</p>
  
  <pre><code>function show_graph(charttype, data, options){
  
      var chart_options = {
          series: {
              charttype: {
                  show: true
              }
          }
      }
  
      var plot = $.plot($("#chart1"), [data], [chart_options]);
  }
  </code></pre>
  
  <p>so I suppose the real question is "why am I getting an "invalid number of parameters" error when I'm passing 3 parameters and accepting 3 parameters?"</p>