title: Can I use document.getElementById.write(); to write inside of heredoc?
body: <p>I want to be able to edit something inside of a heredoc syntax. Something like this:</p>
  
  <p>index.php:</p>
  
  <pre><code>$var = &lt;&lt;&lt;HTML
                  &lt;form action="index.php" method="get" id="forma"&gt;
                  &lt;input type="radio" name="choice" value="value"&gt;Message&lt;br&gt;
  
                  &lt;/form&gt;
  HTML;
  ...
  $form = $var;   
  </code></pre>
  
  <p>js:</p>
  
  <pre><code>&lt;script&gt;
  document.getElementById('forma').open();
  document.getElementById('forma').write('&lt;input type="submit"&gt;');    
  document.getElementById('forma').close();
  &lt;/script&gt;
  </code></pre>
  
  <p>EDIT: My goal is to have a button to go to a new page, but the button won't be present until you click OK on a JS  <code>confirm()</code> popup.</p>