I want my elfinder should be closed automatically after file selection.
<script>
function upload_slider(){
var f = $('#elfinder').elfinder({
url : 'plugins/elfinder/php/connector.php',
height: 490,
docked: false,
dialog: { width: 400, modal: true },
closeOnEditorCallback: true,
getFileCallback: function(url) {
$('#new_file').val(url);
// CLOSE ELFINDER HERE
}
}).elfinder('instance');
}
</script>
<input type="text" id="new_file" />
<input type="button" onclick="upload_slider();" value="Select File" />
<div id="elfinder"></div>
How to do this? I've searched many places by cant find appropriate way.
After hours i got a solution for you, as I had exactly the same problem. I think its working ok.
})