iframe을 사용하는 상황에서 해결책을 찾았습니다. 고전 ASP가 아니지만 왜 작동하지 않을지 모르겠다. 내가 찾은 article은 다음과 같습니다.
EDIT : 코드 추가. 응용 프로그램에 의해 호출
컨테이너 페이지 : 다음
<head runat="server">
<script language="javascript" type="text/javascript">
function BuildPDF() {
var iframe = document.createElement("iframe");
iframe.src = "BuildPDF.asp?" + <whatever args you need>;
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;
}
</script>
</head>
<body onload="BuildPDF();" onresize="ResizeFrame();">
<form id="form1" runat="server">
<input type="text" id="txtStatus" style="width:80%; font-family: Tahoma, Verdana; font-size: small; font-weight: bold;" readonly="readonly" />
<br />
</form>
</body>
, 어딘가에 BuildPDF.asp에, 당신은 당신이 상태 메시지를 업데이트 할 언제든지 호출 할 수있는이 같은 기능 뭔가를 :
function UpdateProgress(message)
Response.Write("<script>parent.UpdateProgress('" & message & "');</script>")
Response.Flush()
end function
"viewFrame"에서 참조한 페이지는 ContentType "application/pdf"를 스트리밍하는 페이지입니다. 다시 ASP.Net에서이 작업을 수행했지만 고전 ASP에서는 작동하지 않는 이유가 없습니다.
그렇지만 올바른 ASP는 호출되는 ASP 페이지가 Response.ContentType = "application/pdf"를 반환하므로 스크립트 태그를이 페이지로 출력 할 수 없습니다. –
이 경우 세 개의 페이지가 있습니다. 두 개의 iframe이있는 '컨테이너'페이지와 각 iframe의 페이지입니다. 하나의 iframe 페이지에 진행 상태가 업데이트됩니다. 다른 하나는 Response.ContentType = "application/pdf"입니다. –