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 8306997
In Process

The Archive Base Latest Questions

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

I choose an image from the window that open up by clicking a button.

  • 0

I choose an image from the window that open up by clicking a button. Then I display the selected image. I am creating a div, then I create an image element. I get the source of the image from the uploaded file source and then append it in the div. It works fine without any server, But the window prompts for blocked contents and I allow it. But when i run it on the server, the image doesn’t show up! Even no permission is asked! Everything works fine in chrome and firefox!

Here is some code,

if(document.all) {
        var image = document.createElement("img");
        image.src = document.getElementById('fileElem').value;
        }
thumbnail.appendChild(image);
  • 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-08T18:26:30+00:00Added an answer on June 8, 2026 at 6:26 pm

    This would have worked in older browsers because traditionally <input type="file" /> had a value attribute that returned the full path to the specified file in the local filesystem. However since around 2006 (think IE7+, Firefox 2+, Chrome, etc) browsers no longer provide the full file path, they only provide the file’s name without directory information. This is to protect the user’s privacy (because uploaded “My Documents” files might contain the user’s real-life name, for example).

    This affects both uploaded files (the browser no-longer sends the full file path in POST requests, so server-side code only get the filename and file data) as well as local scripts (as you’re experiencing yourself).

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

Sidebar

Related Questions

I have an image selector that allows to choose an image from a gallery,
I need to choose image with file open dialog and then show it in
I have a UIActionSheet which has options to choose image from Camera or photo
I have a JFileChooser that lets users choose an image for themselves. I want
I have an app that allows the user to choose an image, at design
I would like to program a image picker which should choose an image from
I'm using the UIImagePickerController to choose an image, and display it to the user
I am trying to choose an image randomly from a sub directory inside my
I have an app where the user can choose an image either from the
Can I use OpenFileDialog in Android? I want to choose image from OpenFileDialog and

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.