Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Triggering an event in an iFrame

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #160956
    Matt
    Participant

    Hi Guys,

    I am trying to work out how to trigger an on click event in an iFrame, from a button in the parent document.

    The iFrame is a social sign up feature offered by Silverpop our mailing list management software. It only works through an iFrame, which is problematic when integrating with responsive design.

    I am actually trying to trigger the onClick event attached to this Anchor:

    <a id="socialClickThis" xthyperlink="302001" xturl="http://wickedthemusical.com.au/thanks" xtsn="FA" href="#" name="Social Sign In with Facebook" xtwebform="4544372" onclick="return signIn("facebook", "http://www.pages01.net/acmn/wicked/SocialSubscribe?vs=MTUyZTRjZjYtMjVkMC00MmYzLTkwY2EtNGVjY2IzMzU0NDVjOzsS1&sp_socid=2542&sp_socoi=true", "302001");">
    <img width="5" height="5" border="0" alt="" src="//contentz.mkt912.com/lp/images/social_network/sn_facebook_large.png" />
    </a>

    I’ve put the button and iFrame in the Pen if you need the full code etc
    http://cdpn.io/isAjt

    Any ideas?

    #161044
    Senff
    Participant

    You can not let the parent interact with the contents of an iframe, or vice versa. They are two completely independent environments.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.