WordPress.org

Ready to get started?Download WordPress

Forums

Link opens new window or tab in background (6 posts)

  1. BanditSiix
    Member
    Posted 1 year ago #

    I need to figure out how to get a link to open in a new window or tab but in the background so that the page the link is on, stays in the front.

    Here's why. For visitors to my site, I give them an opportunity to listen to an audio explanation of what they are looking at without having to leave the page. I could just place an audio player on the page but the audio instructs them to visit additional pages. If they leave, it will interrupt the audio and for their best experience it has to keep playing. So I put the audio player on a separate background page that I want to open separately.

    I don't want to complicate it either by giving additional instructions beyond, just click this link because we know visitors fall off when we add additional steps.

    I appreciate your help and would love to hear your suggestions.

  2. Juan Rangel
    Member
    Posted 1 year ago #

    You have to add target="_blank" to the link.
    Example

    <a href="http://yoursite.com" target="_blank"">New Page</a>
    <a href="http://yoursite.com">Same Page</a>
  3. BanditSiix
    Member
    Posted 1 year ago #

    I did add the _blank target to the link but the problem is it opens in a new tab and the focus goes to the new tab.

    I need it to open the new tab but keep the focus on the current tab.

  4. Juan Rangel
    Member
    Posted 1 year ago #

    You may want to pop up the player. check out something like this http://wordpress.org/extend/plugins/mp3-jplayer/screenshots/

  5. BanditSiix
    Member
    Posted 1 year ago #

    OK, I played with mp3-jplayer and the only problem with that is that I can only add a pop out player to a widget (as far as I've been able to figure out.) Even then it requires the user to click on a link/button that's not very clear to make the player a popout. That would require too many instructions for the user.

    Any other suggestions to get a new window or tab to open but keep the focus on the current page/tab?

  6. hitesh90
    Member
    Posted 1 year ago #

    Try This..
    I think this is helpful to you..

    <a href="http://www.google.com" onclick="window.open(this.href,'_self');window.open('#','_blank');">
        Click Here
        </a>

Topic Closed

This topic has been closed to new replies.

About this Topic