Hi all,
I was just wondering if it's possible to use the execCommand("SaveAs") to
Save a text file already on the client or server as opposed to saving a
web page.
The scenario:
My users' are exporting data, i've written an object in ASP to create a
temp file in c:\winnt\temp.. if export is successful. Once the temp file
is created i'll like the users to save the file to their own preferred
path through the saveAs dialog box, then obviously delete the temp file.
I've managed to do this without the dialog as in forcing the users to
write out the full path, but it dosen't seem user friendly.
Any idea(s) will be highly welcome.
NB: i've started playing round this saveas command but when i save the
file the result is an internet message: page cannot be found.
code:
<script>
function getFile(file)
{
window.WINNT_TEMP = window.open(file,"Get","width=50,height=50");
setTimeout
('WINNT_TEMP.document.execCommand"SaveAs");WINNT_TEMP.close);', 1000);
}
</script>
Cheers
Ade'