Click to See Complete Forum and Search --> : Emulating user interaction
gyochum
07-29-2004, 12:01 AM
I want to write a Javascript function that emulates a user clicking Browse, selecting a file, and clicking Ok for a file input HTML control. I am able to call the Click event for the Browse button which brings up the dialog box for file selection, but am stuck after that. Does anyone have any suggestions how to do the rest? Any help would greatly appreciated.
Pittimann
07-29-2004, 02:20 AM
Hi!
First of all: 'click()' is IE only. So, in other browser you would not even reach that step. The rest of what you want is not possible for security reasons. You cannot manipulate a file input's value.
Imagine, you were browsing the web and a page simply grabs files from your hdd. Would YOU like that?
Cheers - Pit