Unable to close popup using modal in joomla

I opened a popup in Joomla 1.5 using modal.js. This is a SqueezeBox. I tried to close this pop-up by pop-up content, but I can’t.

A message appears in Chrome

Uncaught TypeError: Unable to read property ' x'undefined

+3
source share
4 answers

Please check this code.

<script type="text/javascript">
    window.setTimeout('closeme();', 5000);
    function closeme()
    {
        parent.SqueezeBox.close();
    }
</script>

Hope this helps you ...

+2
source

I used Joomla 2.5 to open Virtuemart 2 "ask about the product." And here is my code (for my attribute <button>) to close the modal window:

onclick="parent.document.getElementById('sbox-btn-close').click();"
+1
source

Squeezebox close() div id 'sbox-window'. close().

If the modal method is used by default (modal content received via ajax and entered directly into the DOM).

document.getElementById ('Sbox window') Close () ;.

If the modal value is in the iframe

window.parent.document.getElementById ('Sbox windows') Close () ;.

0
source

Just call SqueezeBox.close();while working with the modules in the Joomla backend.

0
source

Source: https://habr.com/ru/post/1795979/


All Articles