문제

I have a problem When I am using Responsive File Manager in Standalone , the problem came when I want to Double click Image from dialog Responsive file manager then append into Preview DIV.

here my code to call responsive filemanager

<a href="http://domain.com/assets/backend/lib/rf/filemanager/dialog.php?type=1&amp;popup=1&amp;field_id=backgroundName" class="btn iframe-btn" type="button">Select Picture</a>

script is included is

    <script type="text/javascript" src="{{base_url()}}assets/backend/lib/tinymce/tinymce.min.js"></script>
        <script type="text/javascript" src="{{base_url()}}assets/backend/lib/rf/filemanager/plugin.min.js"></script>
        <script type="text/javascript" src="{{base_url()}}assets/backend/lib/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.pack.js?v=1.3.4"></script>

$(function(){
      $('.iframe-btn').fancybox({
      'width'   : 880,
      'height'  : 570,
      'type'    : 'iframe',
      'autoScale'   : false
      });
      $('#download-button').on('click', function() {
        ga('send', 'event', 'button', 'click', 'download-buttons');
      });
      $('.toggle').click(function(){
        var _this=$(this);
        $('#'+_this.data('ref')).toggle(200);
        var i=_this.find('i');
        if (i.hasClass('icon-plus')) {
          i.removeClass('icon-plus');
          i.addClass('icon-minus');
        }else{
          i.removeClass('icon-minus');
          i.addClass('icon-plus');
        }
      });
});

the error is

Uncaught TypeError: Cannot read property 'document' of null at include.min.js line 11

Here my jsfiddle http://jsfiddle.net/viyancs/LQG36/

anyone can help me this ?

resource http://responsivefilemanager.com/

도움이 되었습니까?

해결책

Hi I found the solution

don't user query &popup=1 in iframe mode , I am change to this

<a href="http://domain.com/assets/backend/lib/rf/filemanager/dialog.php?type=1&amp;field_id=backgroundName" class="btn iframe-btn" type="button">Select Picture</a>

Now it's work

다른 팁

  1. If you used document.write();

In JavaScript document.write () is currently being parsed information can be used to write documents, and containing the code that calls this method in the place tag puts the text in an HTML document.

only in the top-level code tag document.write () can be called, which will document this script because it is run as part of the parsing process.

<html>
<body>

<script>
document.write("Hello");
</script>

</body>
</html> 

2.and.... I think... you checked include.min.js file import.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top