You need to sign in to do that
Don't have an account?

how to download in one click
Hi,
Please help me out from this issue,
I have to download more then one attachment by single button click .
Please any on can share some code sample
This is my code :
public List<String> GetSelectedAttachments() { if(selectedAttachments.size()>0) { integer j = selectedAttachments.size(); String strURL; for(integer i=0; i<j; i++) { strURL = '/servlet/servlet.FileDownload?file=' + selectedAttachments[i].Id; attLinks.add(strURL); } System.debug('&&&&&&&&&&'+attLinks.size()); return attLinks; } else { return null; } }
<apex:repeat value="{!SelectedAttachments}" var="s"> <a href="somedoc.html" target="newWindow" onclick="window.open('{!s}', this.target); return false">click here</a> </apex:repeat>
Thanks