textarea#files {
width: 600px;
height: 200px;
cursor: pointer
}
</style>
<script type="text/javascript">
function openKCFinder(textarea) {
window.KCFinder = {
callBackMultiple: function(files) {
window.KCFinder = null;
textarea.value = "";
for (var i = 0; i < files.length; i++)
textarea.value += files[i] + "\n";
}
};
window.open('/demo/kcfinder/browse.php?type=files&dir=files/public',
'kcfinder_multiple', 'status=0, toolbar=0, location=0, menubar=0, ' +
'directories=0, resizable=1, scrollbars=0, width=800, height=600'
);
}
</script>
<textarea id="files" readonly="readonly" onclick="openKCFinder(this)">Click here and choose multiple files with the Ctrl/Command key.
Then right click on one of them and choose "Select"</textarea>