Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q780 Can you simulate a click on an <input type="file"> button?

You are here: irt.org | FAQ | JavaScript | Form | 11 | Q780 [ previous next ]

You should be able to simulate a click on any form element using the click() method:

<FORM NAME="myForm">
<INPUT TYPE="file" NAME="myFile">
</FORM>

<SCRIPT LANGUAGE="JavaScript"><!--
document.myForm.myFile.click();
//--></SCRIPT>

Although using Netascape Navigator 4.5 on Linux, the above generates the error message: "Warning: Cannot find callback list in XtCallCallbacks"

Feedback on 'Q780 Can you simulate a click on an <input type="file"> button?'

©2018 Martin Webb