View Full Version : How to use onclick to trigger file diaglog (browse button)?
bobby9101
Aug 9th 2007, 11:19 am
Hi, i have an a file upload form, but later on the page I want to be able to click a button and using the onclick event, trigger the form input field that would cause the file browser dialog to open.
How do I trigger a form element with onclick?
Thanks so much,
Bobby
nhl4000
Aug 13th 2007, 8:14 pm
Maybe this could help you, http://www.codeproject.com/jscript/JavaScriptOpenDialog.asp
TomDeLonge
Aug 14th 2007, 10:44 pm
As far as I remember You can use document.Form1.upload1.click(), but this will work only in IE, other browsers do not allow this due to security issues.
On very bottom of the page: http://www.quirksmode.org/dom/inputfile.html
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.