---
title: "Open File Dialog box on <a> tag"  
description: "Open File Dialog box on <a> tag"  
author: "Anonymous User"  
published: 2013-09-25  
updated: 2013-09-25  
canonical: https://www.mindstick.com/forum/1542/open-file-dialog-box-on-a-tag  
category: "html5"  
tags: ["html5"]  
reading_time: 1 minute  

---

# Open File Dialog box on <a> tag

I want to have an Open File [dialog box](https://www.mindstick.com/forum/34699/create-alert-dialog-box-in-android) on a link in my webpage.

I tried

<[input](https://www.mindstick.com/forum/159209/how-can-i-read-convert-an-input-stream-into-a-string-in-java) name="uploadedfile" type="file">

but, it works as a button. And, doesn't allow to [select](https://www.mindstick.com/forum/160534/orderby-then-select-vs-select-then-orderby-performance) [multiple files](https://www.mindstick.com/forum/33990/attach-multiple-files-gridview-row-in-knockout-js).

I want to have something like

<a href="#" [onclick](https://www.mindstick.com/forum/12718/onclick-for-hyperlink)="some_function_for_OpenFileDialogBox">[Upload](https://www.mindstick.com/forum/12860/how-to-upload-file-asynchronously-using-generic-handler) Files</a>

[Please suggest](https://answers.mindstick.com/qa/43506/please-suggest-the-bathing-date-at-kumbh).

Thank You

## Replies

### Reply by Anonymous User

Hi Alex,

You can only open a "Open File" [dialog](https://www.mindstick.com/forum/562/jquery-dialog-box-not-closed-in-asp-dot-net-mvc-4) 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](https://www.mindstick.com/blog/12797/iowa-is-expected-to-see-heavy-growth-in-multiple-sectors) />

<a href="" onclick="document.getElementById('upload').click(); return false">Upload</a>


---

Original Source: https://www.mindstick.com/forum/1542/open-file-dialog-box-on-a-tag

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
