• Resolved jasontd

    (@jasontd)


    Hello,

    I am trying to enable something that seems like it should be fairly simple, and I need some help. I am developing a landing page that has three identical images on it at different places. Each image, when clicked, should link to the site’s purchase page. Before sending the user to that page, however, there should be a popup window with the terms and agreements displayed in an i-frame and with “Agree” / “Disagree” options. Could you please help me figure out how to do this?

    I was able to enable this behavior for one link with the Agreement plugin (http://wordpress.org/plugins/agreement/), but it won’t work with more than one per page.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    I’ve no idea what the plugin does, there’s several ways to handle popups. It’s possible the plugin could be hacked to work with multiple links per page.

    The code is not too complex, so it’s probably easier to start from scratch than figure out someone else’s code. It’s all done with javascript. I suggest always keeping JS in a separate file which is enqueued with PHP wp_enqueue_script(). As opposed to echoing out script inside of <script> tags.

    Open the popup with window.open(). The popup does whatever then uses window.opener.location.href = url; (or something like that – untested) to redirect the parent window to a new location when it’s appropriate. Then the popup closes itself with window.close()

    Thread Starter jasontd

    (@jasontd)

    Thanks for the help with the JavaScript on that. The assistance is much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Agree / Disagree with I-Frame in Pop-Up on Image Click?’ is closed to new replies.