WordPress.org

Ready to get started?Download WordPress

Forums

How to get valid x html to open in a new blank window (6 posts)

  1. usholmes
    Member
    Posted 7 years ago #

    Hi there,
    I am wondering if anyone can tell me how to get the valid x html link to open in a blank window rather than onto its self. I am working on a split blog.

    I used the classic theme but modified it so it doesn't look much like the classic theme anymore. My clients requested that their blogs be on a split screen.. a "his version" "her version" view. So I did that but now I am not sure how to get the links to open in a different window rather within the split screen.

    I could really use some advice and possible code since I am now brain dead after all of the editing. (I am totally new to the blog editing world).

    Here is the link of the site, keep in mind I am not at all finished with it yet: http://www.themotorcyclelife.com and go to "Our Forum".

  2. peiqinglong
    Member
    Posted 7 years ago #

    http://www.dynamicdrive.com/forums/showthread.php?t=18307

    I recommend not using the target="_blank" but rather javascript if you absolutely have to do this.

  3. jbbrwcky
    Member
    Posted 7 years ago #

    You can add in the onclick="this.target='_blank'" to your link to get around the validation problem.

  4. whooami
    Member
    Posted 7 years ago #

    target=_whatever is quite valid in xhtml transitional. Its strict that it shouldnt be used in.

    And I dont think thats what he wasactually asking, I believe he just wants to know how to get the ACTUAL link to the validator to open in a new window.

    usholmes, right now, for instance, the link on the right to the validator is as follows:

    <a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a>

    you need this:

    <a target="_blank" href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a>

  5. pizdin_dim
    Member
    Posted 7 years ago #

    "target=_whatever is quite valid in xhtml transitional. Its strict that it shouldnt be used in."

    That's true. But it's still depreciated which means you really should be thinking hard about why you want to keep doing it.

    It's a bit like going into McDonalds three times a day for a crapburger that's about to be discontinued. What's the point? It's about to disappear so just live with it.

  6. whooami
    Member
    Posted 7 years ago #

    pizdin_dim,

    I answered the question in 2 ways. the way the first repliers "read" the question and the way I read the question.

    The first 2 replies seemed to be addressing whether or not there was a way to open a link in a new window, and still have valid xhtml.

    There is. They provided one way - I provided another.

    What any particular person uses is up to them, and honestly, if someone wants a crapburger, who cares if its going to be discontinued. Today its there, so live it up.

    Additionally, on a personal note, I rather doubt that something being deprecated is really going to cause me much sleep loss or thought beyond this thread. I use what I want to accomplish what I want.

    To each their own.

Topic Closed

This topic has been closed to new replies.

About this Topic