Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web page automation.... How to fill a 'File' input value on a form

Status
Not open for further replies.

SnyAc

Programmer
Jul 25, 2001
272
US
I'm automating several 'other-party' web page functions in my applications and I need to fill in the value of a file name on a form. The html descriptor for the form field is type="file" and class="filebutton". I can click the field which displays the windows file selector dialog... but I can't fill the .value property... seems to be read only.

Any suggestions/ideas would be greatly apprectiated.



Andy Snyder
SnyAc Software Services
 
Andy,

The "file" type in a web page pretty much is readonly.

You can, in some browsers - I'm thinking of ie, put a value in, but most will ignore it (some might throw an error).

It's a security feature designed to stop malicious prepopulation of pop-ups which would upload files automatically.

I have spent a lot of time trying to bypass this, and not found much that works well. The closest I have come is to use a keyboard macro that stuffs text values into the field.

If you do find a solution - please post it!

At the moment I use West-Wind IP tools - that works very well indeed for downloads, nice progress indicator etc. Not so good for uploads... no progress indicator

Regards

Griff
Keep [Smile]ing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top