General discussion

Locked

prepopulate HTML file field ?

By johnjohn51 ·
Can this be done.

I want to pass the name of a file on the client's machine into an html page. The page will then prepopulate a file input tag and the file will be uploaded. Can this be done? Is there a different method to do this?

Thanks inadv

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

W3C says yes, browsers say no

by Jay Eckles In reply to prepopulate HTML file fie ...

The W3C HTML 4.01 recommendation says that you can use the value attribute to indicate the intial file, but in practice most browsers do not honor any assignment to the value attribute, nor do they let you assign the value attribute via scripting. This is a good thing, because unscrupulous web masters could use such a feature to put you just one unknowing click away from sending your windows password file or MS Money file, whatever.

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums