The "id" attribute is not valid for the "scri

For technical support for all editions of CSE HTML Validator. Includes bug reports.

The "id" attribute is not valid for the "scri

Postby HansMerkl » Sun Aug 31, 2008 10:31 pm

Hi,
I am using ASP.NET in conjunction with components from Developer Express. These components produce a lot of code looking like this:

<script id="dxis_477473448" src="/WebResource.axd?d=SpT-elmj4xAG8cWDIbyhVkm-uskSP51lN5bZHbi4uvWnPBi5zBsoxCFCqFMMjgOFiAk4ORblc5GsE71Xa25Zaw2&amp;t=63353465762846...

HTML Validator raises this error:

The "id" attribute is not valid for the "script" element. Some valid attributes for this element are: "charset", "defer", "event", "for", "language", "runat", "src", and "type".

Since I can't change the Developer Express components is there a way to ignore these errors in HTML Validator? I am using Version 9.

thanks

Hans
HansMerkl
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 9
Joined: Tue Apr 12, 2005 12:10 pm

Postby Albert Wiersch » Mon Sep 01, 2008 10:39 am

Hello,

If you have the professional edition, then you can use the Configuration Editor to add the "id" attribute the the "script" element.

This should help:
http://www.htmlvalidator.com/htmlval/configuration.html

See example 3, but you don't have to create the "id" attribute because it is already there (use id (182)). You just need to assign id (182) to the script (090) tag name using the Attributes tab in the Configuration Editor:

1. Select script (090) as the Tag Name being Configured using the Attributes tab of the Configuration Editor.
2. Add id (182) to the script tag's attributes.

That should do it!
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2448
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX


Return to CSE Tech Support

Who is online

Users browsing this forum: No registered users and 2 guests