Discussion Locked

prepopulate HTML file field ?

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

1 reply

by jay eckles

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.

This discussion is closed to new replies.