I want to have an Open File dialog box on a link in my webpage.
I tried
<input name="uploadedfile" type="file">
but, it works as a button. And, doesn't allow to select multiple files.
I want to have something like
<a href="#" onclick="some_function_for_OpenFileDialogBox">Upload Files</a>
Please suggest.
Thank You
Anonymous User
25-Sep-2013You can only open a "Open File" dialog using a input type=file tag. However the efect you are looking for can be accomplished like this :
<input type="file" id="upload" name="upload" style="visibility: hidden; width: 1px; height: 1px" multiple />
<a href="" onclick="document.getElementById('upload').click(); return false">Upload</a>