• Hello,

    I can’t seem to figure out how to get a DOM to work… instead of “on_sent_ok parent.$.fancybox.close();” I need a DOM code block that will do the same thing since on_sent_ok is deprecated.

    Thank You,
    Josh

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter joshmans

    (@joshmans)

    Hello,

    I checked the documentation and gave it a try.. it doesn’t work – I’m sure I’m missing something really easy and I’m going to feel like an idiot once you point out what I’m doing wrong!

    This works: on_sent_ok: “$.fancybox.close();”

    This does not:
    add_action( ‘wp_footer’, ‘mycustom_wp_footer’ );
    ?
    function mycustom_wp_footer() {
    ?>
    <script type=”text/javascript”>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    ???? $.fancybox.close();
    }, false );
    </script>
    <?php
    }

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the site?

    Thread Starter joshmans

    (@joshmans)

    Hello. This is at:

    wwww.otstechs.com/acuveterans

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Try switching to the default theme and deactivating all other plugins.

    Thread Starter joshmans

    (@joshmans)

    I already did that and it behaved the same. I can’t leave it that way long term for you to take a look at – I can do it for a short period of time if you want – or else do you have any other ideas?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘DOM Handling – Need Help’ is closed to new replies.