WordPress.org

Ready to get started?Download WordPress

Forums

How to add popup page when user goes out of the website? (8 posts)

  1. tomasi514
    Member
    Posted 4 years ago #

    I want to add a popup when someone want to leave the website for another one. Have you heard about a plugin that can do that? Any other solution is welcome too!

  2. cubecolour
    ɹoʇɐɹǝpoɯ
    Posted 4 years ago #

    Why do you want to do that? It always looks spammy and will annoy people. Keep them on your site by offering good content and signpost your call to action to them clearly rather than putting speedbumps in their way.

  3. MichaelH
    Member
    Posted 4 years ago #

    What numeeja said +100

  4. syncbox
    Member
    Posted 4 years ago #

    Well, if you want to do it, you can do it this way:

    1) create your link to the other site
    2) insert your cursor (you must be in html mode) into the link after the closing quote of the href=""
    3) hit the spacebar, then type: onclick="target='_blank'"

    That will not cause a validation warning you normally would get if using the target attribute in strict xhtml doctypes. At worst, the link will simply open in the same page (should the user not have javascript enabled, which is not typically the case)

    Not always a great idea, but certainly asked for by many. I don't think it's "spammy" and you could put in a title attribute to tell the user that the link will open in a new browser window or even put that in parentheses after the link.

    HTH

  5. syncbox
    Member
    Posted 4 years ago #

    Oh, sorry, I didn't realize what you were wanting to do I guess... I have to agree with the others if all you want to do is keep your site window open.

    I assumed you simply didn't want an external link to replace YOUR site.

  6. tomasi514
    Member
    Posted 4 years ago #

    I also agree with you guys, this is not a personal idea.
    I only assume everything people want to do on a website, WordPress can do it.
    syncbox, thanks for the time spent with this, sorry you did not answer it right ;)

  7. MichaelH
    Member
    Posted 4 years ago #

  8. tomasi514
    Member
    Posted 4 years ago #

    loll all right Michael, I guess I understood the answer here.
    No plugin here ;) (& once again I understand this)

Topic Closed

This topic has been closed to new replies.

About this Topic