Last active
October 14, 2016 01:19
-
-
Save magnet88jp/880a6b434460d6bb047dfc202c59c844 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page controller="ZipDownloadDemoController" standardStylesheets="false" showHeader="false" applyHtmlTag="false" applyBodyTag="false" > | |
<link rel="stylesheet" href="{! URLFOR($Resource.bootstrapsf1, 'src/dist/css/bootstrap.css')}" /> | |
<script src="//code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script> | |
<!-- Begin Default Content REMOVE THIS --> | |
<h1>Zip Download Demo</h1> | |
<div id="dldemo" class="btn btn-default">download</div> | |
<script> | |
var RemoteActionModule = ZipDownloadDemoController; | |
$(function() { | |
$('#dldemo').click(function(){ | |
var objectId = '00T2800000qbclH'; | |
RemoteActionModule.getZipDownloadUrl(objectId, function(result, event) { | |
if(event.status) { | |
location.href = result; | |
return false; | |
} else { | |
console.log('error=' + JSON.stringify(event)); | |
} | |
}, { | |
escape: false | |
}); | |
}); | |
}); | |
</script> | |
</apex:page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment