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
  • #160956

    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="" xtsn="FA" href="#" name="Social Sign In with Facebook" xtwebform="4544372" onclick="return signIn("facebook", "", "302001");">
    <img width="5" height="5" border="0" alt="" src="//" />

    I’ve put the button and iFrame in the Pen if you need the full code etc

    Any ideas?


    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.