elfinder question

Javascript coding ..

Moderators: egami, macek, gesf

Post Reply
faust
New php-forum User
New php-forum User
Posts: 109
Joined: Thu May 03, 2012 7:22 am

Fri Mar 08, 2013 2:08 pm

Hi guys, I don't know how many of you are using elfinder, but I think it's the best js file manager out there. I have maybe a simple question, but I'm struggling with it for the past 2 days. I want to have a link and a text field. When I click the link, elfinder should open. When I double click on the desired file, the elfinder popup should close and the path to the file should fill the textbox. I tried this piece of code, but it's not working for me:

Code: Select all

$(document).ready(function() { 
var opt = { 
url : '<?php echo URL::base(); ?>/js/elfinder/php/connector.php', 
lang : 'en', 
editorCallback : function(url) { 
document.getElementById('field').value = url; 
}, 
closeOnEditorCallback : true, 
docked : true, 
dialog : { title : 'File Manager', height: 500 }, 
} 

$('#file').click(function() { 
$('#elfinder').elfinder(opt); 
$('#elfinder').elfinder($(this).attr('id')); 
}); 
}); 
Any help would be greatly appreciated. Cheers ^_^

Post Reply