title: How to insert JavaScript in JasperReports's report
body: <p>How to add <em>JavaScript</em> lines in <em>JasperReports</em>'s report?</p>
  
  <p>I have added a static text field and made mark up as HTML and inserted the text as <code>&lt;script&gt;&lt;/script&gt;</code></p>
  
  <p>But it doesn't display <em>JavaScript</em> when exported</p>
  
  <pre><code>&lt;band height="79" splitType="Stretch"&gt;
      &lt;staticText&gt;
          &lt;reportElement mode="Opaque" x="0" y="0" width="555" height="79" backcolor="#EEEEEE"/&gt;
          &lt;textElement markup="html"/&gt;
          &lt;text&gt;&lt;![CDATA[&lt;script type="text/javascript"&gt;window.alert('hello');&lt;/script&gt;]]&gt;&lt;/text&gt;
      &lt;/staticText&gt;
  &lt;/band&gt;
  </code></pre>
  
  <p>Am I missing some more attributes to set? And I can't find a concrete document explaining how to embed <em>JavaScript</em> code in report. Please provide link to any documentation if available</p>