Re: Even better

On 9/24/07, Kim Daugaard <kim.daugaard@gmail.com> wrote:
> Hi,
>
> I have a suggestion for making W3C validator even more attractive.
>
> We are making all html prototyping without any web server (hundreds of
> pages). We can place a link to the 'Validate by file upload,'
> http://validator.w3.org/#validate_by_upload on each page
> (and we do) but we still have to browse for the file each time we want to
> validate it.
>
> What I would like, was the ability to add the file name to the get-request
> (using javascript, like:
> http://validator.w3.org/#validate_by_upload?file=C:\folder\file.html
> ), and have it filled into the file input field of the upload page. Then we
> only need to press 'Check'.
>
> That would be really cool!
>

Hi Kim,

Browsers do not support pre-populated (default values for) file input
fields. As you can imagine, if this were possible it would be trivial
to upload specific files off an end user's computer with malicious
intentions.

For security reasons, any file which is uploaded to a web site must be
manually selected by the end user. Unfortunately you'll either have to
manually select and upload the files for validation  - or - look into
one of the documented libraries for connecting to the Validator's API
and create your own intermediate script which will upload the file to
the validator, or send the file's content as direct input.

http://validator.w3.org/docs/api.html#libs

-- 
-Brett Bieber

http:saltybeagle.com aim:ianswerq

Received on Friday, 28 September 2007 02:18:02 UTC