"Clive Moore" <helloclive (AT) hotmail (DOT) com> wrote
Quote:
Does anyone know if it is possible to call urldownloadtocachefile()
from
javascript? I need to download a file from a url to a temp directory
for printing. |
I'm going to assume you're talking about IE on Windows only here,
because there would be no way of using URLDownloadToCacheFile() from
other browsers without having them execute a WSH script or something
(assuming the other browser is even running on Windows).
There is no way to do this in the default browser security environment.
Besides, the only control you have over printing in the default browser
security environment would be to call window.print();
The way to retrieve a document into the cache is to load it in a browser
instance:
var w = window.open('yourpage.html');
or set the location of a <frame> or <iframe>. Then call window.print();
However, it appears you want far more control than this, which means you
probably want to host your application in a HTA <url:
http://msdn.microsoft.com/workshop/a...taoverview.asp
/>.
--
Grant Wagner <gwagner (AT) agricoreunited (DOT) com>
comp.lang.javascript FAQ -
http://jibbering.com/faq