sending a link from one iframe to another

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • darkfact
    New Member
    • Sep 2010
    • 15

    sending a link from one iframe to another

    This link is in the same iframe as my media player:

    Code:
    <a href="music/playlist.m3u" onclick="PlayM3u(this.href);return false">
    It works fine there but I would like to move it to another iframe. Could someone tell me how to write it so that it would activate my media player from the other iframe.

    Thanks
  • Logic Ali
    New Member
    • Jul 2010
    • 16

    #2
    If the player is in the first iframe and the link in the second, try:
    Code:
    <a href="music/playlist.m3u" onclick="parent.frames[0].PlayM3u(this.href);return false">
    or if the player's iframe has the ID 'thePlayer':
    Code:
    <a href="music/playlist.m3u" onclick="parent.document.getElementById( 'thePlayer' ).contentWindow.PlayM3u(this.href);return false">

    Comment

    • darkfact
      New Member
      • Sep 2010
      • 15

      #3
      Thank you very much. The second one works perfectly.

      Comment

      Working...