The below code is working for the text file but not for the zip. I want to create a Save dialog option to save zip file. any help is greatly appreciated.
<html>
<body>
<script language='javascript'>
function downlodMyFile( MyFile ){
document.execCommand('saveas',false, MyFile);
}
</script>
<button onclick="downlodMyFile('source.zip')">Download My File</Button>
</body>
</html>
I saw this snippet in on the JS forum. can someone help me to change this code to download zip file.
function ShowSaveComplete() {
if (document.all) {
var OLECMDID_SAVEAS = 4;
var OLECMDEXECOPT_DONTPROMPTUSER = 2;
var OLECMDEXECOPT_PROMPTUSER = 1;
var WebBrowser = "<OBJECT ID=\"WebBrowser1\" WIDTH=0 HEIGHT=0 CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></OBJECT>";
Bookmarks