New Posts
Welcome guest, is this your first visit?
  • Login:
PokerRebel.com Affiliate Program
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    MPC
    MPC is offline
    Senior Member
    My Status
     
    ----
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    Canada Eh?
    Posts
    1,379
    Blog Entries
    20
    Feedback Score
    8 (100%)

    Default Validation error when using target="_blank"

    Using doctype xhtml strict will create validation error for using target="_blank". Is there a way around this WITHOUT using javascript?

  2. #2
    Formerly TPB
    My Status
     
    ----
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    Wales
    Posts
    672
    Feedback Score
    16 (100%)

    Default

    Didn't know about that, found this on my travels though: How to replace target="_blank" for XHTML strict w3 compliance - StatCounter User Forum

    Or you could just change it to transitional and happily use the target tag as much as you like.

    EDIT: Didn't see the without javascript part. I think it's a no then. You will have to change to transitional if you want it to validate.

  3. #3
    MPC
    MPC is offline
    Senior Member
    My Status
     
    ----
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    Canada Eh?
    Posts
    1,379
    Blog Entries
    20
    Feedback Score
    8 (100%)

    Default

    Are there any pros/cons to transitional vs srtict?

  4. #4
    Formerly TPB
    My Status
     
    ----
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    Wales
    Posts
    672
    Feedback Score
    16 (100%)

    Default

    Not at all really. As you know it's just a level that you are trying to code to, and the validator tells you how well you are coding to the level you are shooting for.

    The target attribute is obviously being made a deprecated tag in xhtml strict, which makes sense seeing as purists want the user to be in control of everything when browsing a website, and this tag forces a new window on the user. Kind of javascript-esque in a way.

    By going with transitional it just means that you want to use the target attribute on your site and still want the page to validate. It doesn't mean the site is any less well-constructed. It's the same as if you want to use capitals in your code like <STRONG>word</STRONG>, it's acceptable for HTML 4.01 level coding and will render perfectly fine, but it's not up to the level of xhtml (where you should use all lower case).

    If you really want to stick with strict then you are going to have to do without forcing the new window, but that's another debate in itself!


    EDIT: As a suggestion, you can always make your outbound links a different colour so that visitors will know that they are being taken to a poker room or out of your site. You can use a clever piece of CSS to do this, and your visitors won't ever be surprised when they click on a link and get taken away from the site. They will still open in the same window of course, but visitors will be prepared to CTRL+click instead and so it will improve usability.

    Outbound Link Colour

  5. #5
    MPC
    MPC is offline
    Senior Member
    My Status
     
    ----
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    Canada Eh?
    Posts
    1,379
    Blog Entries
    20
    Feedback Score
    8 (100%)

    Default

    Thanks Greg

  6. #6
    Let's Eat A Goddamn Snack
    My Status
     
    ----
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    Cayman Islands
    Posts
    204
    Feedback Score
    0

    Default

    I don't see the point of worrying about this sort of error with validation.


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Replies: 8
    Last Post: 04-15-2010, 07:27 AM
  2. Replies: 0
    Last Post: 10-29-2009, 06:16 AM
  3. Article "open in new window": higher conversion or too spammy?
    By Strider1973 in forum Wordpress - Web Design - Coding - Technical
    Replies: 9
    Last Post: 10-17-2009, 09:17 AM
  4. "Fun" and "No Deposit" - converting keywords?
    By TheShortStack in forum General Poker Affiliate Forum
    Replies: 3
    Last Post: 01-20-2009, 03:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBulletin® Version 4.1.5
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
SEO by vBSEO 3.6.0