Reputation:
I have a button or link button. I want to open a window for file uploading by clicking the button or link button. Actually at that time I won't have any file upload control there. can any one tell me how to do it by using JavaScript?
Upvotes: 0
Views: 2562
Reputation: 207531
I think you are asking that you want to open up the file upload dialog with a click of something other than the input element itself.
You can not just open up the file upload dialog since that is sort of a thing we call a security issue. You can style the input field to make it look like something else
Upvotes: 0
Reputation: 140205
<button onclick="window.open('the_page_containing_the_upload_form.html', 'Upload form')">Upload</button>
Upvotes: 1