469,361 Members | 2,217 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,361 developers. It's quick & easy.

sending a link from one iframe to another

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

Expand|Select|Wrap|Line Numbers
  1. <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
Sep 18 '10 #1

✓ answered by Logic Ali

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

2 1522
If the player is in the first iframe and the link in the second, try:
Expand|Select|Wrap|Line Numbers
  1. <a href="music/playlist.m3u" onclick="parent.frames[0].PlayM3u(this.href);return false">
or if the player's iframe has the ID 'thePlayer':
Expand|Select|Wrap|Line Numbers
  1. <a href="music/playlist.m3u" onclick="parent.document.getElementById( 'thePlayer' ).contentWindow.PlayM3u(this.href);return false">
Sep 18 '10 #2
Thank you very much. The second one works perfectly.
Sep 18 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Luke Vogel | last post: by
reply views Thread by colleen1980 | last post: by
1 post views Thread by pintu | last post: by
1 post views Thread by czi02 | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.