I have been reading question posted, however i could not find reasonable answers.
What I want to do is zip selected files. The file are all pdf files. Here is html my code
<form role="form" id="download">
<div id="all-folders-1" class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<input name="pdfs" class="select pull-left" value="first.pdf" type="checkbox" style="margin-right:5px;"><b class="pull-left">Folder</b>
<br/>
<div class="all-folders-checkbox checkbox">
<label>
<input name="pdfs" class="entity" value="file1.pdf" type="checkbox">
File 1
</label>
</div>
<div class="all-folders-checkbox checkbox">
<label>
<input name="pdfs" class="entity" value="file2.pdf" type="checkbox">
File 2
</label>
</div>
<div class="all-folders-checkbox checkbox">
<label>
<input name="pdfs" class="entity" value="file3.pdf" type="checkbox">
File 3
</label>
</div>
<div class="all-folders-checkbox checkbox">
<label>
<input name="pdfs" class="entity" value="file4.pdf" type="checkbox">
File 4
</label>
</div>
</div>
</form>
And here I get selected checkbox by jquery.
var selected = [];
$('#download div input:checked').each(function() {
selected.push($(this).attr('value'));
});
Basically I want to save each value .pdf
in an array named selected
. After that I dont know how to zip them in a folder by javascript. Or is that possible?