title: Asynchronous DOM manipulation with JavaScript and ColdFusion templates?
body: <p>I just started using ColdFusion and I've come up with a problem I'm not sure how to tackle.</p>
  
  <p>So, right now I have Cold Fusion serving HTML/JS templates to the browser. These templates also pull in data from session data and I used them in the templates as conditionals/variables.</p>
  
  <p>In one of these templates, I am generating a <code>.xlsx</code> file, using <code>&lt;cfspreadsheet&gt;</code>. It is represented by a button on webpage, when clicked downloads the file. The problem is that the page/template being served takes 5+ seconds to load, since it looks like it is taking 5+ seconds to generate the <code>.xlsx</code> file with the correct data. </p>
  
  <p>So my question is there a way to load this particular page, but make the generation of the <code>.xlsx</code> asynchronous. So in practice, load the particular page, the download button is disabled, the generation of the <code>.xlsx</code>file completes, download button is enabled.</p>