PDA

View Full Version : Another XHTML question


Chris M
07-03-2005, 11:20 AM
I so love XHTML :speechless:

Anyway - Like all people who actually want to make browsing as easy as possible for multi-browser users, I try to stick to XHTML standards :)

The page, according to the W3's validator, is XHTML compliant, but it shows this as a Warning below "This page is valid XHTML 1.0 Transitional" blarb...

character "<" is the first character of a delimiter but occurred as data

When I had another XHTML invalidity, I recieved this message along with the other, which happened to by a typo :p

Line 14, column 29: character "<" is the first character of a delimiter but occurred as data

for ( var i = 0 ; i < onloads.length ; i++ )

If you wish to include the "<" character in your output, you should escape it as "&lt;". Another possibility is that you forgot to close quotes in a previous tag.
Any idea how to get rid of this error?

Satan

Marco van Herwaarden
07-03-2005, 11:26 AM
Make sure your JavaScript coding is surrounded by HTML comment tags.

Chris M
07-03-2005, 12:51 PM
Make sure your JavaScript coding is surrounded by HTML comment tags. :rolleyes: I'm an id... (you know the word):p

Thank you Marco :)

Satan

Marco van Herwaarden
07-03-2005, 01:17 PM
Lol, i hate JS (and HTML) so much that i consider it all as comment. :D

deathemperor
07-03-2005, 02:28 PM
Ok it's my turn. I got:

Line 671, column 6: document type does not allow element "thead" here

<thead>

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).



do you have any idea what causes it ?

EDIT: I fixed it with the help when I check "show source" and "parse tree"

this is what I cannot figure out why:

Line 651, column 12: there is no attribute "for"

<script for="WMPNET" event="PlayStateChange(JState)" language="JScript" type="text/javascript">

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.



I wrote it for event handling for WindowMediaPlayer on HTML page, in WMP SDK from MS they wrote:

<SCRIPT LANGUAGE = "JScript" FOR = Player EVENT = playStateChange(NewState)>

but here the errors show =_=.