WordPress.org

Ready to get started?Download WordPress

Forums

Target=_BLANK (17 posts)

  1. Danny
    Member
    Posted 10 years ago #

    In my popup comments, i want peoples websites to open in new windows when they leave a comment, how can i do this? Thankyou.

  2. Danny
    Member
    Posted 10 years ago #

    bump

  3. OperaManiac
    Member
    Posted 10 years ago #

    well, u can add base target to _blank since its a popup page... :)

  4. Alex King
    Member
    Posted 10 years ago #

    I think Matt was saying this is already the way it works... what version are you using that it isn't working this way?

  5. Danny
    Member
    Posted 10 years ago #

    im using Word Press 1.0, it installed itself with my cpanel :P

  6. trakwebster
    Member
    Posted 10 years ago #

    Well, one idea. In your subject title you have no quotes. The format should have quotes, like this: target="_blank".
    I don't know if that's the problem, but if you don't have quotes, add them as shown and see if it works.

  7. WillM
    Member
    Posted 10 years ago #

    Either use the base target as Susubh suggested or display your comments inline. I recommend the latter. 'target="_blank"' is deprecated in recent versions of XHTML and a lot of people here REALLY don't like it.

  8. antifuse
    Member
    Posted 10 years ago #

    He doesn't want his comments to popup in a new window, he wants commenter's websites to pop up in a new window... (ie the link for a person's name in the comment they left opens in a new window). Despite Matt's claims to the contrary, it DOESN'T currently work that way, at least not in the Miles release, and not when your comments are inline...

  9. WillM
    Member
    Posted 10 years ago #

    I thought the problem was that he doesn't like the links opening inside the pop-up window because it makes a lot of sites hard to read. If you switch to inline comments you don't need to open a new window because the window is already full-size.
    I always got the impression that the reason links in pop-up windows open inside the same window is because 'target="_blank"' is deprecated and including it would go against the whole philosophy of WordPress. We've already had the debate about why opening new windows is wrong. I'm not even sure why pop-up comments are supported.

  10. Danny
    Member
    Posted 10 years ago #

    but when i switch to inline comments, i cant get it to use my template. i have tried including the header and footer from my site and that just makes it include it twice on my main blog page. i have tried putting the pure html code in but that does the same and displays it on the normal blog page.

  11. Anonymous
    Unregistered
    Posted 10 years ago #

    its ok now, i uninstalled it and reinstalled it in my root directory, its much easier :P

  12. philor
    Member
    Posted 10 years ago #

    Tiptoe, through the holy war...
    Since wp-comments-popup.php does open a popup (sometimes), wouldn't the purest path that does the least harm to the most people be to include the javascript to rewrite rel="external" links in it? You should be able to avoid forcing _blank on people who've been cunning enough to avoid the popup in the first place by wrapping the script in something like if (window.opener). Someone who control-clicked the popup into a new tab gets to manage their own links, someone who has a little popup window doesn't have to figure out how to open links somewhere else that's big enough to read in.

  13. WillM
    Member
    Posted 10 years ago #

    I don't like rel="external". Either you agree with the W3C that opening links in a new window is wrong, or you don't. Opening new windows with javascript is just a way of claiming standards compliance - i.e. your pages still validate - while weaseling out of its implications.

  14. Orbit Juice
    Member
    Posted 10 years ago #

    Personally, I would rather have comments/trackbacks open in a new window. And dare I say, comments and so forth opening in a new window is pretty much standard for blogware.

  15. philor
    Member
    Posted 10 years ago #

    Well, the W3C didn't say that opening links in a new window is wrong, they said it was presentational rather than semantic. XHTML is intended to mark up semantics, while CSS and Javascript handle presentation. Using a rel value that isn't defined in the rec without specifying a profile is technically wrong, but what Javascript and a browser conspire to do with the semantics of an XHTML page is completely out of XHTML's scope.
    And then there's the other side of the coin, the one that involves actual people with actual problems. WP makes it possible to have comments in popups by deleting two characters in one file, but keeping those popups from being a miserable pain for the average user requires that the site owner find a link to an article that explains how to add some Javascript. Given that WP includes the template for the popup, I don't see why it shouldn't also include the Javascript to make it tolerable.

  16. Anonymous
    Unregistered
    Posted 10 years ago #

    onclick="window.open(this.href);return false;"
    just add that ;)

  17. eke
    Member
    Posted 10 years ago #

    death to all popups! they shall be our target! ready the blanks!
    search is your fwiend.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.