Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML JavaScript

elfinder question

Javascript coding ..

Moderators: macek, egami, gesf

elfinder question

Postby faust » 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 ^_^
faust
New php-forum User
New php-forum User
 
Posts: 109
Joined: Thu May 03, 2012 7:22 am

Return to JavaScript

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron