Hi all,
I have asp program created a pdf file on the fly.
After the pdf file is created, I would like to open the pdf file automatically for user instead of click the link on the page. I tried, but it's not working, any clues?
My code is like this:
<HTML>
<HEAD>
<TITLE># Print Brochure</TITLE>
</HEAD>
<BODY>
<%
OrderID=Trim(Request.QueryString("orderID"))
PONumber=Trim(Request.QueryString("ponumber"))
FileName=CreatePrintDoc(PONumber, OrderID)
'create a link that the user can open the pdf file manually
Response.Write "<p>Your <b>PDF Print Enrollment Form " &FileName & "</b> can be download <A TARGET=""_new"" Href=""/E-Cert/SelectPrint/" & FileName & """>here</A></p>."
'try to use javascript to open the pdf file automatically
%>
<script language="JavaScript">
<!--
alert('/E-Cert/SelectPrint/<%=FileName%>');
alert('<%=FileName%>');
var newWindow = window.open('/E-Cert/SelectPrint/<%=FileName%>', '_blank');
newWindow.focus();
// -->
</script>
</BODY>
</HTML>