Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Jun 2010
    Posts
    31
    Thanks
    4
    Thanked 0 Times in 0 Posts

    "target" attribute and "Strict" document type

    Hi All,

    Quick question I hope!

    I get the error below when checking site on http://validator.w3.org/

    my document type is W3C//DTD XHTML 1.0 Strict and I'm using a "target" attribute. (to open a new window to confirm email address for feedburner)

    Is this error anything to worry about?

    Should I change my document type to transitional? (I don't really understand the difference between the two and why you should chose one over the other).

    thank you

    Will

    there is no attribute "target"
    …t-align:center;" method="post" target="_blank" action="http://feedburner.googl…

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
    Last edited by sohopigeon; 07-06-2010 at 06:28 PM.

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    target is only used for framesets in strict mode. If you want to create a pop-up, you should use javascript, not target. The reasoning behind this is that creating a pop-up is a behavioral, not a structural, property. Markup is for structure, javascript is for behavior.

  • #3
    New Coder
    Join Date
    Jun 2010
    Posts
    31
    Thanks
    4
    Thanked 0 Times in 0 Posts
    thank you, I was just starting to think that, I'll re-post in the JavaScript forum for further help.

    Will

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Quote Originally Posted by sohopigeon View Post
    thank you, I was just starting to think that, I'll re-post in the JavaScript forum for further help.

    Will
    No! You shouldn't cross post your issue in multiple forums as it's against forums rules. Instead, just request a moderator to move it to the right place (you may even use the report button).

    Now, to your query, take a look at The case for not opening a link in a new window, especially _Aero_'s reply.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    New to the CF scene
    Join Date
    Dec 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sorry for coming back here, but i dont understand very much these codes
    how can i fix this

    (you must use the "Transitional" document type to get the "target" attribute)

    I use thiw instead
    PHP Code:
    "TARGET="_blank 
    on my www.elgreko.gr

    Thanks and sory for my english

  • #6
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,592
    Thanks
    0
    Thanked 644 Times in 634 Posts
    target is ONLY valid in HTML 3.2 - it was deleted from HTML 4 so as to improve visitor experience by giving a greater choice. So to use it with any HTML 4 tags you MUST specify that the page is still transitioning from HTML 3.2. To complete the transition to HTML 4 you would remove the target attributes completely and let your visitors choose what opens in a new tab and what opens in a new window. Those more familiar with how their browser works will have it set to ignore the target attribute and open pages where they want them to anyway.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #7
    New to the CF scene
    Join Date
    Dec 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oh yes you give me a good point, i was checkin this for 2 days without finding
    a solution, i wil remove the target atributes.. hope all will be ok

    and some last question please, if i want to include an icon lets say for Twitter
    what code is better, can you please write one here

    Thanks for your answer


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •