Skip to:
Content
Pages
Categories
Search
Top
Bottom

getting HTML validation errors…

Viewing 9 replies - 1 through 9 (of 9 total)

  • chrishajer
    Participant

    @chrishajer

    Not sure which two errors you received, but here are the two I received:

    Line 31, Column 12: there is no attribute "clear"

    That’s true. It needs to be <br style="clear:both;" /> to be valid.

    Line 93, Column 50: there is no attribute "target"

    That’s true as well, but who cares? It brings me to one of my favorite _ck_ quotes of all time: “throw off your shackles of validation”

    http://www.google.com/search?q=%22throw+off+your+shackles+of+validation%22

    http://bbpress.org/forums/topic/open-links-in-new-window

    There are a couple of solutions there.

    1. drop the attribute altogether (let the visitor determine where they want the link to open)

    2. use Sam’s javascript solution

    3. use _ck_’s route and just run with it. Who cares if it validates? It works just fine and has no negative affect on anything

    Thanks for the reply, Chris. I’d be only too happy to disregard validation errors, except for two factors:

    1. I’m still relatively new to all this html/css/php stuff, so I do learn from reading the validation reports.

    2. I lean heavily on support from a variety of forums, some of which don’t share your casual attitude toward validation. I try to keep my code “clean” to appease them.

    I looked at the second link you posted above. Does this plugin actually reside in the plugin library? I did a couple of searches and couldn’t find it. Or, do I just cut the code and put it in a file, and upload it as a plugin?

    Thanks again.


    chrishajer
    Participant

    @chrishajer

    But you don’t need a plugin to add the code to open in target="_blank", you are already doing it, which is what’s causing the validation problem. That is deprecated and invalid, so, you need to stop using it, or use Sam’s javascript method.


    chrishajer
    Participant

    @chrishajer

    Yeah, the plugin would not help since those target=”_blank” attributes are not in the posts, they are for the ads. Don’t force them to open them in new windows or use the javascript method from sambauers and the page will validate fine.

    Is Sam’s code in the plug-in library, or do I just copy it and insert it into my right sidebar file?

    Also, does this code modify *all* links in a given page?

    Thanks.


    chrishajer
    Participant

    @chrishajer

    You don’t need a plugin at all, since these are not posts with the links: they’re sponsored images in your template.

    You need to find this:

    target="_blank"

    And replace it with this:

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

    in whatever file you added the target=”_blank” to. Sounds like it’s in your sidebar. You will need to manually edit that file. If it’s not a static file and is being generated by WordPress or something, then you would need a WordPress plugin to add the links with the javascript onclick instead of deprecated target=”_blank”.

    Ah, OK, I get it. I didn’t realize that the window.open stuff was a javascript method (I told you I’m a novice!). Thanks for the clarification.

    I think I also found another way to get the target=”_blank” code to validate (sort of): I noticed that my main site (www.scopedin.com) doesn’t return errors on that same sidebar code. I think it’s because the DOCTYPE at the top of the page is 1.0 transitional. I suppose I could use this in my bbpress header as well?

    Thanks again for the help.


    chrishajer
    Participant

    @chrishajer

    Looks like you have it resolved, after checking your page just now. Changing from strict to transitional would work too, instead of using this javascript method.

    Actually, the forum looks sort of messed up now, so it looks like you’re working on it.

    Heh…”messed up” is my middle name.

    I was trying to figure out why the “height” attribute is so important in the header division. Somehow, some of the elements are getting floated to places I don’t expect them, so I have to keep it in, I guess.

    I was also playing with whether the sidebox should go within the wrapper or the main division. There’s some regrettable use of fixed widths in the kakumei template which makes moving things around a bit dicey.

    But…I think the validation issue is fixed. Thanks…

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.