0

I am new to this field. I am trying to build a joomla website, in which I would like a subscription form (acy mailing). The form I 'd like it to be a pop-up window. I searched the other inquiries in this forum and I have achieved the most of it. Now I have a pop-up form (acy mailing subscription module), but the form closes when I click in the form. When I click outside the form does nothing as I want it. Here is the code I used:

<script>
// When the user clicks on <div>, open the popup
function myFunction() {
  var popup = document.getElementById("myPopup");
  popup.classList.toggle("show");
}
</script>
 <div class="popup" onclick="myFunction()">CLICK HERE TO SUBSCRIBE
     <span class="popuptext" id="myPopup">
<table class="acym_form">
    *(the acy mailing form module here)*
</table>     
</span> 
</div>

Does anyone have a solution for this?

Thank you very much in advance!

mickmackusa
  • 43,625
  • 12
  • 83
  • 136
  • If you are doing Joomla development, please join us at [joomla.se] Stack Exchange. – mickmackusa Jul 06 '20 at 07:21
  • Does this answer your question? [How to ONLY trigger parent click event when a child is clicked](https://stackoverflow.com/questions/38861601/how-to-only-trigger-parent-click-event-when-a-child-is-clicked) – mickmackusa Jul 08 '20 at 02:32

0 Answers0