Re: [VE][125] w3c issue - please give a solution

On Fri, 18 May 2007, Arun [Kenriche] wrote:

> Validating http://www.digitalsolutionsltd.com/Index.aspx
> Error [125]: "value of attribute Y invalid: X cannot start a name"

I think the specific error message is rather clear:

*** QUOTE
Error  Line 80 column 44: value of attribute "ID" invalid: "_" cannot 
start a name.

...type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" 
value="/wEPDwUKLTUxNzA3MTc5

It is possible that you violated the naming convention for this attribute. 
For example, id and name attributes must begin with a letter, not a digit.
*** UNQUOTE

The value of the id attribute must be, by the formal syntax rules that the 
validator checks against, an identifier. The identifier syntax somewhat 
varies from HTML version to another, but no version allows the low line 
(underline) "_" character as the _first_ character of an identifier.

In this case, you can simply remove the attribute id="__VIEWSTATE", unless 
you use it e.g. in scripting. (It does not affect the form data at all; 
the form data is constructed from name/value pairs where the name is specified 
in a name="..." attribute.) If it is needed, then it (and references to 
it) should be fixed so that it begins with a letter, e.g. VIEWSTATE or
ID__VIEWSTATE.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Friday, 18 May 2007 06:58:20 UTC