W3C home > Mailing lists > Public > www-validator@w3.org > July 2011

Re: Validations Show different Results when done through Javascript and when done by Direct Input on W3C website

From: Ville Skyttä <ville.skytta@iki.fi>
Date: Sat, 23 Jul 2011 18:38:49 +0300
Message-ID: <4E2AEB09.4050808@iki.fi>
To: www-validator@w3.org
On 07/21/2011 04:56 PM, chandan.kumar.parmar@accenture.com wrote:

>     var encodedContent = getRadWindow().ClientParameters;

Does this get the document content in application/x-www-url-encoded
(UTF-8) form?  If not:

>     var params = "fragment=" + encodedContent ;

...you'll probably want to do something like this here instead:

     var params = "fragment=" + encodeURIComponent(encodedContent);

...as well as in any case, before sending the request, set the
appropriate Content-Type header:


> The resulting screen shows 2 Errors and 2 Warnings (highlighted in Red):
> [cid:image002.jpg@01CC47DC.07E66A60]
> But when the same content is validated on the W3C website as Direct Input,  1 Error and 4 Warnings are shown (highlighted in brown):
> [cid:image006.jpg@01CC47DC.07E66A60]

These images lack information about _what_ the errors and warnings you
receive are, so they're not that useful.

If the above tips don't help, I suggest using a network analyzer like
wireshark to compare the JavaScript and direct input POST request
contents.  http://www.wireshark.org/
Received on Saturday, 23 July 2011 15:39:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:04 UTC