Skip to main content
Inspiring
November 13, 2009
Question

cfwindow not validating with W3C xhtml 1.0 validation check

  • November 13, 2009
  • 3 replies
  • 801 views

Greetings,

When I try to validate a .cfm page against the W3C xhtml 1.0 validator with

a <cfwindow> process encoded to the page, I get the error message

indicated below.

If I remove all reference to the <cfwindow> process then the page validates

as xhtml 1.0 compliant.

Is <cfwindow> compliant with the xhtml 1.0 standard? If so, what am i

missing to make it validate as compliant?

Thanks in advance for any insight to this situation.

Leonard B

<!--- Begin - Error Message --->

Line 3, Column 130: document type does not allow element "img" here

…ax/resources/cf/images/loading.gif'/>";

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

<!--- End - Error Message --->

<!--- Begin - Code on page --->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<cfajaximport tags="cfwindow, cfform, cftooltip">

</head>

<body>

<cfwindow
    center="true"
    closable="true"
    draggable="true"
    modal="true"
    resizable="false"
    initshow="false"
    refreshonshow="true"
    height="600"
    name="sysreg"
    source="system_registration.cfm"
    title="R E G I S T R A T I O N"
    width="780">
</cfwindow>

</body>
</html>

<!--- End - Code on page --->

    This topic has been closed for replies.

    3 replies

    itisdesign
    Inspiring
    November 15, 2009

    Hi Leonard,

    This is due to version of ColdFusion (8.0.1 or older).  ColdFusion 9 now wraps it's generated JavaScript (not all, but a significant amount) in CDATA tags.

    Thanks!,

    -Aaron Neff

    chrisbowyer
    Known Participant
    November 14, 2009

    I recall seeing the same error when using cfwindow and believe it is created by ColdFusion, so not your fault. If it makes you feel any better, do a CSS and HTML validation check on http://w3.org and some of the guru sites; http://forta.com, http://coldfusionjedi.com, http://shayna.com - they are full of errors.

    BKBK
    Community Expert
    Community Expert
    November 14, 2009
    I recall seeing the same error when using cfwindow and believe it is created by ColdFusion, so not your fault. If it makes you feel any better, do a CSS and HTML validation check on http://w3.org and some of the guru sites; http://forta.com, http://coldfusionjedi.com, http://shayna.com - they are full of errors.

    I went one better. I ran the exact cfwindow code above, and copied the resulting HTML source to http://validator.w3.org/check for validation. There were no errors!

    BKBK
    Community Expert
    Community Expert
    November 14, 2009

    Cfwindow validates fine. It is likely that validation fails for the page system_registration.cfm.