JCO wrote on 17 okt 2005 in comp.lang.javascript
:
"Evertjan." <ex**************@interxnl.net> wrote in message Randy Webb wrote on 17 okt 2005 in comp.lang.javascript: > There is no Javascript that can "force" that download dialog.
In fact there is.
Serverside ASP-javascript can force a stream to be downloaded by:
Response.AddHeader("Content-Disposition","attachment;filename=my.pdf")
[I hope the above displays on one line]
Content-Disposition RFC:
<http://www.faqs.org/rfcs/rfc2183.html>
Clientsided javascript cannot, I agree with Randy.
[please do not toppost on usenet]
I hope I can write a JavaScript that is uploaded to the server (as my
other scripts) that can invoke a download dialog (either the standard
windows dialog or a user created dialog).
Sorry, but serverside code [asp-javascript, asp-vbscript, php, etc] kan
only work on the server and usually prepares and renders html content to be
sent to the client, which can have clientside script code, like javascript
[or also vbscript on the IE browser].
The dialog surely must be on the client browser and the download also, be
it that the with serverside code provided header code Content-Disposition
can force the client to use it's own download popup window, instead of the
usual stream that directly dislays pdf.
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)