• im trying to find a how-to make my links in links manager open to the viewer in a new window
    and leave my main in the current

    any idea how to ?

Viewing 8 replies - 1 through 8 (of 8 total)
  • If you don’t care about valid XHTML, you can simply add target=”blank” into the href. (Not sure now, don’t use it any more, but it may actually be like this: target=”_blank”).

    Or if you don’t care whether those with js disbled get the new window, you can use this: onclick=”window.open(this.href);return false;”

    Other than that, I don’t know any further ways to do that. The js solution validates, but as I said, will cause problems for those who’ve disabled js.

    In the WP control panel under Links each link offers the option to open in a new “_blank” window. Just set it for each link in there.

    Yeah, but that’s a non-validating solution as well. And I never was able to note that that worked for me when I was testing it (may have something to do with using a tabbrowser extension in FF though, not sure….)

    That article from A List Apart presents a nice solution that validates.

    Yep, that’s true. But so does the “onclick” solution, but they both are still problematic for people who don’t have js enabled. I don’t know that that’s a huge proportion of the surfing public, but I don’t know that it’s not either.

    If you are really concerned with XHTML validation just change the doctype to transitional vs strict.

    I just tested it on my blog and for whatever reason it is not creating a validation warning for my page, though it should be, as there is a target=”_blank” on one of the links.

    It does open in a new firefox tab for me though.

    Just for the record, I too think that you should let the users decide where they want to open the links instead of forcing the new tab/window.

    Yeah, target is an acceptable attribute in a transitional DOCTYPE. If you want pop-up windows, good luck getting it to work with a strict DOCTYPE and still be accessible.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘make Links open in new window’ is closed to new replies.