Joomla media manager opens in the new window.



  • Good afternoon! I'm writing a module. Joomla 3.43♪ There's a button in the moduleAdd withdrawalAnd when you press, there are elements in the block, including the button.Add the image" After adding the elements to the block, with the click on the tip."Add the image"The media manager has to open up in the fashion window, and instead there's a shift in the reference. But if I press the button to keep the click,Add the imageThe manager will open in the fashion window. Although the components are added exactly after the module is retained. Here's the code:

    function addComment(el){
        $html = '';
        var n = 'list'+i;
        document.id('selectlist').innerHTML += '<a class="modal btn" rel="{handler: \'iframe\', size: {x: 800, y: 500}}" href="index.php?option=com_media&view=images&tmpl=component&fieldid='+n+'&folder=" title="Выбрать"> Выбрать</a>'
    }

    And the button, after the pressure on which the function is called

    <ul class="select" id="selectlist">             
    </ul>
    <div>
        <a href="" class="add" onclick="addComment();return false;">Add Comment</a>
    </div>

    Tell me what's wrong. I don't know where to dig. Thank you.



  • Maybe your buttons aren't attached with a machine gun to compression and fashion window? I mean, at the time of creation, it's not just to create a button, but to make a refresh to your library or to put things on it.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2