title: Creating temporary HTML code
body: <p>I try to make my code more modular. Currently I include <em>jspf</em> file which contain code for <a href="http://api.jqueryui.com/dialog/" rel="nofollow">jQuery Dialog</a> into any required <em>jsp</em> file.</p>
  
  <p>I want to put this HTML code into JS file, so I only need to include one .js file instead of two:</p>
  
  <pre><code>function activateZoomingDialog() {
      var tmpId = ???;
      tmpId.innerHTML = '&lt;input type="text"&gt;&lt;/input&gt;...';
      $(tmpId).dialog({
          modal: true,
          title: 'Select area size',
          ...
      });
  }
  </code></pre>
  
  <p>How to create and maintain (life-cycle) temporary DOM structure? jQuery solution will be acceptable.</p>