www.webdeveloper.com
Results 1 to 8 of 8

Thread: validation assistance

  1. #1
    Join Date
    Dec 2003
    Location
    A series of tubes known as the "internets"
    Posts
    2,166

    validation assistance

    i'm getting some peculiar errors in the validation of this page. it tells me that there is no "target" attribute twice, yet there are dozens of that code on the page. it also has a problem with my <ul>.


    EDIT: oh. i wish i could read. i didn't notice that note about the target attribute in the validation results. but i'm still curious about the <ul>.

    EDIT 2: problem cleared. thanks anyways.

    Line 66, column 44: there is no attribute "target"

    ...7; <a href="http://opera.com" target="_blank">Get Opera!</a> Death to IE!!! E

    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).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.



    Line 104, column 3: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag

    <ul>

    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").



    Line 110, column 144: there is no attribute "target"

    ...title="Acceptible Use Policy" target="_blank">AUP</acronym> Agreement</a></..
    Last edited by rhsunderground; 12-28-2004 at 04:56 PM.
    "Outside of a dog, a book is a man's best friend. Inside a dog, it is too dark to read." - Mark Twain

  2. #2
    Join Date
    Jul 2003
    Location
    Los Angeles California
    Posts
    1,045

    Use
    Code:
    <a href="http://www.ewokgopwjkgopwj.com" onclick="window.open(this.href); return false;">Open popup</a>


  3. #3
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    Originally posted by lakers01

    Use
    Code:
    <a href="http://www.ewokgopwjkgopwj.com" onclick="window.open(this.href); return false;">Open popup</a>

    This is a little better imo:

    <a href="url" onclick="target='_blank';">This will open in a new window for those with js support, if they do not support the js it will open in a normal window</a>

  4. #4
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Originally posted by PeOfEo
    This is a little better imo:

    <a href="url" onclick="target='_blank';">This will open in a new window for those with js support, if they do not support the js it will open in a normal window</a>
    It does not, however, solve the problem that the "target" attribute isn't valid in HTML 4.01. It hides in invalidity from the validator but it is still invalid. But the 4.01 Spec. requires that "HTML documents are constrained to conform to the HTML DTD both before and after processing any SCRIPT elements." ( http://www.w3.org/TR/html401/interac....html#h-18.2.4 )
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  5. #5
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    Originally posted by Charles
    It does not, however, solve the problem that the "target" attribute isn't valid in HTML 4.01. It hides in invalidity from the validator but it is still invalid. But the 4.01 Spec. requires that "HTML documents are constrained to conform to the HTML DTD both before and after processing any SCRIPT elements." ( http://www.w3.org/TR/html401/interac....html#h-18.2.4 )
    But would doing it with my method make it any more inaccessible then the previous method?

  6. #6
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Originally posted by PeOfEo
    But would doing it with my method make it any more inaccessible then the previous method?
    It does violate the accessibility guidelines, but in practice I don't think that it's any worse than the others. It does, however, contain the problems unique to each of the other two. If you want to use the "target" attribute then use the "target" attribute. Cheating isn't allowed and it isn't nice.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  7. #7
    Join Date
    Dec 2003
    Location
    A series of tubes known as the "internets"
    Posts
    2,166
    so basically i have to keep links pointed to the window they're already in. damn.
    "Outside of a dog, a book is a man's best friend. Inside a dog, it is too dark to read." - Mark Twain

  8. #8
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Originally posted by rhsunderground
    so basically i have to keep links pointed to the window they're already in. damn.
    You can use the "target" attribute with one of the transitional DTDs or you can use the JavaScript method described above by lakers01.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

Thread Information

Users Browsing this Thread

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

Posting Permissions

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



Recent Articles