I’m trying to make Javascript force a download, but I don’t know how. Here is my current function:
function saveFile() {
var list = document.playerCtrl.downloads;
var downloadURL = list.options[list.selectedIndex].value;
window.location.href = downloadURL;
}
all of the downloadURLs are pointed to WMVs (videos) on a server. This (of course) automatically opens Windows Media Player. Is there any way for me to force a right click/save as?
The only way, is to change the extension to something unique (.uwe for example).
then, you instruct the user to change the extension on saving to .wmv or whatever…
if the client has that extension assigned to something, it will open it by default, unless they have selected to be notified, and to choose each time they click a link (which can be a pain).