File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaScript to SaveTarget

 
Kevin P Smith
Ranch Hand
Posts: 362
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 362
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic