forced PDF-download in popup

D

dany

I want a forced PDF-download but all that header-stuff is new for me....

I wrote a little asp-script:
<%
Filename = "download.pdf"
response.addheader "content-disposition","attachment; filename=" & Filename
server.transfer Filename
%>

It only works with Internet Exporer (mac & pc) but not with Opera, Netscape
7,... ?!

I open it in a small popup but now I would have seen closed the popup
automatically
A simple "response.write" with "window.close()"-stuff don't work?!

ciao bye

d.
 
T

Tom Kaminski [MVP]

dany said:
I want a forced PDF-download but all that header-stuff is new for me....

I wrote a little asp-script:
<%
Filename = "download.pdf"
response.addheader "content-disposition","attachment; filename=" & Filename
server.transfer Filename
%>

It only works with Internet Exporer (mac & pc) but not with Opera, Netscape
7,... ?!

I open it in a small popup but now I would have seen closed the popup
automatically
A simple "response.write" with "window.close()"-stuff don't work?!

You're almost there ... use ADODB.Stream and Response.BinaryWrite.
http://support.microsoft.com/?kbid=276488
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top