Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I found a solution for this situation that uses iframes. It's not classic asp, but I don't see why it wouldn't work. Here's the <a href="http://encosia.com/2007/10/03/easy-incremental-status-updates-for-long-requests/" rel="nofollow noreferrer">article</a> I found.</p> <p><strong>EDIT: added code.</strong></p> <p>Container page called by your application:</p> <pre><code>&lt;head runat="server"&gt; &lt;script language="javascript" type="text/javascript"&gt; function BuildPDF() { var iframe = document.createElement("iframe"); iframe.src = "BuildPDF.asp?" + &lt;whatever args you need&gt;; iframe.style.display = "none"; document.body.appendChild(iframe); } function UpdateProgress(message) { document.getElementById('txtStatus').value = message; } function SetDisplayFileName(fileName) { var viewFrame = document.createElement("iframe"); viewFrame.id = "viewFrame"; viewFrame.src = "WhateverTheNameOfYourPDFViewASPPageAndArgs"; viewFrame.style.width = '100%'; viewFrame.style.height = document.documentElement.clientHeight - 20; document.body.appendChild(viewFrame); } function ResizeFrame() { var viewFrame = document.getElementById("viewFrame"); viewFrame.style.height = document.documentElement.clientHeight - 20; } &lt;/script&gt; &lt;/head&gt; &lt;body onload="BuildPDF();" onresize="ResizeFrame();"&gt; &lt;form id="form1" runat="server"&gt; &lt;input type="text" id="txtStatus" style="width:80%; font-family: Tahoma, Verdana; font-size: small; font-weight: bold;" readonly="readonly" /&gt; &lt;br /&gt; &lt;/form&gt; &lt;/body&gt; </code></pre> <p>Then, somewhere in your BuildPDF.asp, you have a function something like this that you can call anytime you want to update the status message:</p> <pre><code>function UpdateProgress(message) Response.Write("&lt;script&gt;parent.UpdateProgress('" &amp; message &amp; "');&lt;/script&gt;") Response.Flush() end function </code></pre> <p>The page you have referenced in the "viewFrame" is your page that streams the ContentType "application/pdf." Again, I did this in ASP.Net, but I see no reason why it wouldn't work in classic ASP.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload