Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8269075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:06:08+00:00 2026-06-08T06:06:08+00:00

I am uploading an image from my PC. It is working fine in Firefox,

  • 0

I am uploading an image from my PC. It is working fine in Firefox, but in Chrome, the dialog to select the file doesn’t open up! I’m invoking click event of input type in Javascript.

Here is what I’m doing:

<input type="file" id="fileElem" accept="image/*" style="display:none" >
<div id="fileSelect" class="drop-area">Select some files</div>

Here is Javascript:

var fileSelect = document.getElementById("fileSelect"),
fileElem = document.getElementById("fileElem");

  
fileElem.addEventListener("click",function(e){
  var files = this.files
  handleFiles(files)
},false)  
  
  
fileSelect.addEventListener("click", function (e) {
    fileElem.click();
  e.preventDefault(); 
}, false);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:06:10+00:00Added an answer on June 8, 2026 at 6:06 am

    No browser that I know of lets you simulate click on an <input type="file"> itself without user intervention. The reason is security. Browsers require that a user make an explicit manual click (user-initiated click) somewhere on the page. However, once that happens, it’s straightforward to hijack the click and route it to a file input. This is what you’re trying to do.

    See my blob post on the topic. It has a demo that should work: http://ericbidelman.tumblr.com/post/14636214755/making-file-inputs-a-pleasure-to-look-at

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am uploading image to server using base64 its working fine if image is
I'm working on a project that involves uploading an image to tumblr from Python.
I am working on a task to enable image uploading and auto-scaling(from full sized
I'm uploading image files from device to a PHP server by converting the file
I'm interested in uploading a file (image) from an iPhone library/camera roll to a
I am currently working with multiple php image uploading but using this SITE I
I am uploading an image. When I run application from eclipse on my device
I am uploading image using filedrop.js. Code in application.js file looks like this:- $(.droparea).each(function(event){
So i'm uploading any image file via my great upload form and it uploads
We are trying to get image uploading working with TinyPic that tracks the progress

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.