Guest XICO2KX Posted December 15, 2006 Share Posted December 15, 2006 Hi! :blink:I have a web page with links to some audio files...But if people click directly on those links, they get opened on media player! But I wanted that when people clicked on the links, the files got saved instead of just run... This can be done with the "Save Target As..." option, but a single-click solution would be much better! So, is there a way to implement the "right-click -> 'Save Target As'" function on a direct single left-click? Can you give me some hints on how to do this with Javascript? Thanks in advance! Link to comment Share on other sites More sharing options...
MrAdam Posted December 15, 2006 Share Posted December 15, 2006 function saveFile(filename) { document.execCommand('SaveAs',null,filename)} <input type="button" value="Save File" onClick="saveFile('__filename__');" /> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now