Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter seandyer

    (@seandyer)

    I’ve come across a new issue, and I was wondering if you have seen it before or have any ideas on how to handle it. One of the widgets in the theme we are using uses an iframe. Within the iframe there are external links, but since the iframe is technically loading in a completely different html document, the conditions setup on the rest of the site to flag all external links (so the modal window pops up) don’t apply to the document within the iframe. I have been reading about ways to force certain code into the iframe’s document using jquery, but so far nothing has worked.

    Thread Starter seandyer

    (@seandyer)

    I actually got it working by going into your js files for the plugin, and adding
    .attr(“href”, window.location.pathname)
    to the return statement of the
    $.fn.themeClose = function(opts).

    Thanks again for all your assistance and speedy responses. You built a great plugin.

    Thread Starter seandyer

    (@seandyer)

    Thank you so much for all your help and your quick response time. Your script works great, and I was able to easily conform it to my needs, which were pretty much what you described in your last post.

    I think I will be removing the return option and just use the X to close the modal window. The only issue I’m having now is that when I click the X to close the modal window, it closes and then takes me to the external link anyways. Do have any idea about how to fix that?

    Thread Starter seandyer

    (@seandyer)

    I don’t want the external link to open in the modal window though, I still want the link to take the user to the actual site.

    Thread Starter seandyer

    (@seandyer)

    I’m sorry for being thick-headed, I’m just still very new to webdev. I assume that instead of using iframe, I would put ‘a’ to reference the html tag in the modal?

    For the Return option, where should the code go for closing the modal window?

    Thread Starter seandyer

    (@seandyer)

    I had seen that, but I can’t find a js file in the theme, so I wasn’t sure where that should go. I was also wondering if there was a way to have this modal window automatically pop up for all external links without having to by hand add it to each. There are multiple users who are able to post, and if they have an external link within the post, we need this window to still pop up.

    Thread Starter seandyer

    (@seandyer)

    I figured out my question about the previous modals content, but I still have not been able to figure out how to complete the original task.

    My question at this point is how would I go about populating the href to a link within a modal window from the link that called the modal window, and how could I allow the user to stay on the current page instead of going to the link? In other words, the user clicks on a link, a modal window pops up saying, “You are leaving this site” and two options are offered, Leave (go to link that was clicked) or Return (stay on current page, or reload current page).

Viewing 7 replies - 1 through 7 (of 7 total)