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

Kendo Templates and W3C Validation

0 Answers 35 Views
Templates
This is a migrated thread and some comments may be shown as answers.
Jamie
Top achievements
Rank 1
Jamie asked on 14 Nov 2012, 10:46 AM
Hi I have a number of templates on my website and have been asked to run the site through the W3c validator. I am still using XHTML 1.0 Transitional but the validator is throwing up a number of errors. The notable ones are "document type does not allow element "div" here" and "ID "myID" already defined". I know that the page works fine with these inside my template and I don't much mind that they are there but from a client point of view I cannot get rid of the errors from the page.

Has anyone come up with a way to escape the template scripts from the page so they don't appear in validation while still allowing the template to work correctly?

An example of one of my templates:
<script type="text/x-kendo-template" id="clickTemplate">
    <div class="resultLine" onclick="window.location = '${ data.oDataSourceURL }'">
        <a href="${ data.oDataSourceURL }">${data.oDataProductDesc}</a>
    </div>
</script>
Thanks in advance

Jamie

No answers yet. Maybe you can help?

Tags
Templates
Asked by
Jamie
Top achievements
Rank 1
Share this question
or