title: SyntaxError: unterminated string literal
body: <p>I have the below code in which i am getting the strange error.</p>
  
  <pre><code>   function export_to_excel()
  
       {
  
      results_html = $('report_excel').innerHTML;
      results_html = '&lt;html&gt;&lt;body&gt;&lt;table  align="center" cellspacing="0" cellpadding="0" width="100%"&gt;&lt;tr&gt;&lt;td colspan="9"&gt;&lt;b&gt;Employee Salary Register &lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="9"&gt;&lt;/td&gt;&lt;/tr&gt;' + results_html + '&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;';
      var input = new Element('input', {
          'type': 'hidden',
          'name': 'results[html]',
          'value': results_html
      });
      var form = new Element('form', {
          'method': 'post',
          'name': 'Employee Salary Register',
          'action': "html_to_excel"
      });
      form.insert(input);
      document.body.appendChild(form);
      form.submit();
  }
  </code></pre>
  
  <p>The error is occurring at this line </p>
  
  <pre><code>results_html = '&lt;html&gt;&lt;body&gt;&lt;table  align="center" cellspacing="0" cellpadding="0" width="100%"&gt;&lt;tr&gt;&lt;td colspan="9"&gt;&lt;b&gt;Employee Salary Register &lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="9"&gt;&lt;/td&gt;&lt;/tr&gt;' + results_html + '&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;';
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The error is showing in the console of  <em>Firebug</em> pointing to that line.I just attached a Screenshot</p>
  
  <p><img src="https://i.stack.imgur.com/2Ui3u.png" alt="Screenshot"> </p>
  
  <p>There you can see,under the Two Buttons(print and Export),the code is appearing on the screen.Those code lines are part of the function <code>export_to_excel()</code> </p>
  
  <p>It does works perfectly in my Local Server too. I'm Using <em>PrototypeJS</em> and I'm sorry for the Misleading and sorry for the delay too.</p>
  
  <p>Any help will be greatly appreciated</p>