Title: problem with the code module
Last modified: June 24, 2021

---

# problem with the code module

 *  Resolved [solenec2121](https://wordpress.org/support/users/solenec2121/)
 * (@solenec2121)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/problem-with-the-code-module/)
 * Hello,
    I am using a code module to display a newsletter subscription form. When
   I switch my section to a popup, the code module no longer appears in full.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblem-with-the-code-module%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Philipp Stracker](https://wordpress.org/support/users/strackerphil-1/)
 * (@strackerphil-1)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/problem-with-the-code-module/#post-14593027)
 * Hi [@solenec2121](https://wordpress.org/support/users/solenec2121/)
 * Thanks for reaching out, and sorry to hear about those issues!
    I’ve had a look
   at the website you mention, but I cannot find a Popup on that page.
 * On your current page, I can see that you use an iframe and a custom js-file to
   collect newsletter leads. The iframe will display correctly inside Popups, but
   custom js-files are not working out-of-the-box.
 * You need to dynamically load the js-file during the “area_show” event, because
   the Popup is not available in the DOM tree before it’s opened.
 * Here’s a quick sample of such a dynamic loader:
 *     ```
       // Old code, does not work inside Popups:
       <script src="https://app.mailjet.com/statics/js/iframeResizer.min.js"></script>
   
       // New code, works inside Popups:
       <script>(function() {
         DiviArea.addAction('show_area', function(area) {
           var script = document.createElement('script');
           script.src = 'https://app.mailjet.com/statics/js/iframeResizer.min.js';
           document.head.appendChild(script);
         });
       })();</script>
       ```
   
 * You can find more information on that snippet here: [https://tinyurl.com/yjessqer](https://tinyurl.com/yjessqer)
 * The other option is switching to [Divi Areas Pro](https://divimode.com/divi-areas-pro/),
   which has a smart-initialization logic that can handle custom scripts inside 
   Popups.
 * Let me know if you need further advice for this.
    – Philipp 🙂

Viewing 1 replies (of 1 total)

The topic ‘problem with the code module’ is closed to new replies.

 * ![](https://ps.w.org/popups-for-divi/assets/icon-256x256.jpg?rev=2553226)
 * [Popups for Divi](https://wordpress.org/plugins/popups-for-divi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popups-for-divi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popups-for-divi/)
 * [Active Topics](https://wordpress.org/support/plugin/popups-for-divi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popups-for-divi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popups-for-divi/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Philipp Stracker](https://wordpress.org/support/users/strackerphil-1/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/problem-with-the-code-module/#post-14593027)
 * Status: resolved