...

View Full Version : Save as?



ZeligOn
12-17-2003, 05:55 PM
Hello,

Is there a JS function to save a file (ASP in my case) as html
on the user PC, the user need to click on the link\button and the
"save as" window open, is this possible? (the user menu is invisible)

I'm generating a OL PO that can be printed but
the I wold like "Save as" option will be available.

Thanks.

adios
12-17-2003, 06:16 PM
IE-only:

document.execCommand('SaveAs',false,'.html')

This, however, will save the currently loaded page; if you wanted the user to simply download the .asp file without actually displaying it, you'd need to load it into something (frame/iframe/popup) first. Can't say as I've done that, but it works for printing undisplayed files.

ZeligOn
12-17-2003, 10:06 PM
Originally posted by adios
IE-only:

document.execCommand('SaveAs',false,'.html')

This, however, will save the currently loaded page; if you wanted the user to simply download the .asp file without actually displaying it, you'd need to load it into something (frame/iframe/popup) first. Can't say as I've done that, but it works for printing undisplayed files.

Thanks, that is what I was looking for, however the
"IE-Only" is a small problem that I have to deal with all the time...

(:mad: for all the "other" browsers :))



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum