aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes JavaScript to SaveTarget Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JavaScript to SaveTarget" Watch "JavaScript to SaveTarget" New topic
Author

JavaScript to SaveTarget

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Hi guys, need a little help here.

I have a site where you can search through a number of files on a database.
Now I need somesort of download function where I can provide the URL and the user can download the file to thwir local machine.

I tries the SaveAs function but it just tries to save the whole page as an HTML. Is their any sort of SaveTargetAs function I can use?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Why don;t you just say on the page (Right click on the link to save)

The SaveAs code you are using is probably IE only also.

Eric
Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Because I need to record each download so I know who downloaded what/when and my boss would never accept a "right-click here to save" option as a solution. He'll want a button/icon you click on which loads a save window where you select your Desktop/My Documents and lisk save/download
 
wood burning stoves
 
subject: JavaScript to SaveTarget