Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Dusson Deshommes on August 31, 2010 at 5:22 am

    hi guys, I am building my website and I have come up to a wall.
    I have 4 different playlist that I want to come out on a pop up window which I already configured and all but I can’t seem to get my links to open in the same pop up window.
    I want to be able to click on a link and it opens it in the same pop up that is already there. Is that possible.

    This is the code that I am using:


    <p>These are our current playlists:</p>
    <blockquote>
    <p><a href="'media/gospelplaylist/gospelplayer.html'target=_blank">GOSPEL</a></p>

    <p><a href="'media/hiphopplaylist/hiphopplayer.html'target=_blank">HIPHOP - R&B - REGGAE</a></p>

    <p><a href="'media/zoukplaylist/zoukplayer.html'target=_blank">ZOUK - KONPA - LATIN</a></p>

    <p><a href="'media/jazzplaylist/jazzplayer.html'target=_self">LOVE SONGS - JAZZ - BLUES</a></p>

    <p> </p>
    </blockquote>

    Pleas help out if possible..

    Thanks a bunch

    Christopher Filbey replied 15 years, 10 months ago 3 Members · 2 Replies
  • 2 Replies
  • Abraham Chaffin

    August 31, 2010 at 3:28 pm

    Instead of using target=’_blank’ to open your pop up window you want to use onClick=”window.open();”

    Modifying your code it would look something like:


    <p><a href="javascript:void(0);" onClick="window.open('media/gospelplaylist/gospelplayer.html','music_pop_up_win','height=500,width=500');">GOSPEL</a></p>

    <p><a href="javascript:void(0);" onClick="window.open('media/hiphopplaylist/hiphopplayer.html','music_pop_up_win','height=500,width=500');">HIPHOP - R&B - REGGAE</a></p>

    <p><a href="javascript:void(0);" onClick="window.open('media/zoukplaylist/zoukplayer.html','music_pop_up_win','height=500,width=500');">ZOUK - KONPA - LATIN</a></p>

    <p><a href="javascript:void(0);" onClick="window.open('media/jazzplaylist/jazzplayer.html','music_pop_up_win','height=500,width=500');">LOVE SONGS - JAZZ - BLUES</a></p>

    More on window.open can be found here.

    Abraham

  • Christopher Filbey

    November 2, 2010 at 4:02 pm

    The “target” attribute is deprecated and will probably be phased out in the future. Still, if you’re not feeling the use of Javascript, I see a couple of problems with your target=_blank code. Remove the single quotes around the URL and include a double quote after it. Then, put another double quote after target= to finish it. Basically, replace

    a href=”‘media/gospelplaylist/gospelplayer.html’target=_blank”

    with

    a href=”media/gospelplaylist/gospelplayer.html” target=”_blank”

    I hope I understood the problem correctly and this was helpful.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy