Responsive filemanager callback function input field text

1.1k views Asked by At

I am trying to add the value selected from responsive filemanager to a input text field, but once I select the value noting happen, the value does not go to the input text field.

I am following the documentation

Here you are my code:

<script>
function BrowseServer(id){
          alert(id); // configuration
          fileBrowserlink = "../admin/ckeditor/filemanager/dialog.php?type=2&editor=ckeditor&fldr=&field_id=" + id;
          window.open(fileBrowserlink,'pdwfilebrowser', 'width=1000,height=650,scrollbars=no,toolbar=no,location=no');
}
</script>

<input type="text" name="configuration" value="" onclick="BrowseServer('configuration');" id="configuration">

I appreciate any help.

Thank you.

1

There are 1 answers

1
Josh H On

You cannot open the filemanager in a window according to the documentation page "You can use normal pop-up, Bootstrap modal, iframe, FancyBox iframe, Lightbox iframe to open the FileManager..."

Try using the following:

<div class="input-append">
  <input id="configuration" type="text" value="">
  <a href="javascript:open_popup('../admin/ckeditor/filemanager/dialog.php?type=2&editor=ckeditor&fldr=&field_id=configuration')" class="btn" type="button">Select</a>
</div>

Also take a look at the code behind the demo page here for more examples. I based the above code snippet on this code.

Good Luck!