This is a migrated thread and some comments may be shown as answers.

RadDatePicker and Invalid XHTML

9 Answers 74 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
David Johnson
Top achievements
Rank 1
David Johnson asked on 12 Aug 2008, 01:52 AM
Has anyone else noticed that the RadDatePicker control (and possibly other calendar related controls) produce invalid XHTML?

The invalid XHTML comes from the <link> tags it produces for the skins - if I set enableembeddedskins to false, it validates fine. Has this problem been noted?

9 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 12 Aug 2008, 06:06 AM
Hi Nath,

I think I remember a similar problem causing invalid XHTML rendered by the Calendar control, but it has been addressed with the latest release. Please give the Q2 2008 version a try (ASP.NET AJAX version is labeled 2008.7.23) and let us know if you notice anything else.

Please excuse us for the temporary inconvenience.

All the best,
Konstantin Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
David Johnson
Top achievements
Rank 1
answered on 14 Aug 2008, 12:04 AM
Hi,

I have updated to the Q2 release, however the calendar control is still producing invalid XHTML. Please advise.
0
Dimo
Telerik team
answered on 14 Aug 2008, 01:11 PM
Hello David,

As far as I can see, the current official version of RadDatePicker produces valid XHTML. Please provide some more information :

1) Which HTML validator do you use?
2) What is the error?
3) What is the control declaration, outputting invalid XHTML?


By the way, the <link> tags are added to the page by a mechanism, which is used by all RadControls, so if a problem exists, it should be observed with all controls.


Regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
David Johnson
Top achievements
Rank 1
answered on 14 Aug 2008, 11:20 PM
Hi,

Thanks for the reply. Here are the answers:
1) The W3C validator on validator.w3.org
2) Error below, and as the W3C specification states: "The LINK element may only appear in the head of a document."
3) This is the control declaration: <telerik:raddatepicker skin="Default2006" runat="server"/>






 Line 69, Column 238: document type does not allow element "link" here.

…thQB7RVqQ01&amp;t=633523222800000000'></link><link class='Telerik_stylesheet'

✉

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

0
Dimo
Telerik team
answered on 18 Aug 2008, 11:14 AM
Hi David,

You must add

<head runat="server">


Regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Erik Beyer
Top achievements
Rank 1
answered on 19 Aug 2008, 12:52 AM
I am facing the same issue. I already use runat="server" in the <head>. But still got the same error at validation like described.

Regards
Claudio
0
Konstantin Petkov
Telerik team
answered on 19 Aug 2008, 06:14 AM
Hello Erik,

Please upgrade to the latest Q2 2008 following the steps from this KB article and see if the problem persists. If you still need our assistance I will kindly ask you to submit a formal support ticket sending us an example, which replicates the issue. We will gladly look into it and get back to you with resolution.

Regards,
Konstantin Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Erik Beyer
Top achievements
Rank 1
answered on 20 Aug 2008, 04:21 PM
I just upgraded and still got the error by validating the page: See http://validator.w3.org/check?uri=www.gbase.ch&charset=(detect+automatically)&doctype=Inline&group=0
0
Dimo
Telerik team
answered on 21 Aug 2008, 08:52 AM
Hi Erik,

All RadControls for ASP.NET AJAX are XHTML-compliant. If you want to use them with a HTML doctype and validate your markup, please refer to:

How to Use RadControls for ASP.NET AJAX Embedded Skins with an HTML DOCTYPE


Another (more complex) solution would be to set EnableEmbeddedSkins="false" and register the CSS files manually. You can find the non-embedded versions of all skins in the /Skins/ subfolder of your RadControls installation.

Let us know if you need more information.

RadControls for ASP.NET AJAX - Skin Registration


Best wishes,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
David Johnson
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
David Johnson
Top achievements
Rank 1
Dimo
Telerik team
Erik Beyer
Top achievements
Rank 1
Share this question
or