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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:29:13+00:00 2026-05-31T17:29:13+00:00

Here is my code. The problem is that the information isn’t being alerted. It

  • 0

Here is my code. The problem is that the information isn’t being alerted. It worked in Js Fiddle but not on chrome/firefox/safari. When I tried to use document.write to display the text in JsFiddle that didn’t work either. This code is giving me lots of problems.

<html>
<head>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
                    function readMultipleFiles(evt) {
            //Retrieve all the files from the FileList object
            var files = evt.target.files;
            if (files) {
                var r = new FileReader();
                for (var i = 0, f; f = files[i]; i++) {
                    r.onload = (function(f) {
                        return function(e) {
                            var contents = e.target.result;
                            alert(contents);
                        };
                    })(f);
                    r.readAsText(f);;
                }
            } else {
                alert("Failed to load files");
            }
        }
        document.getElementById('fileinput').addEventListener('change', readMultipleFiles, false);

    </script>
</head>
<body>
<input type="file" id="fileinput"/>

​</body>
</html>
  • 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-05-31T17:29:15+00:00Added an answer on May 31, 2026 at 5:29 pm

    try

    window.onload = function() {
        document.getElementById('fileinput').addEventListener('change', readMultipleFiles, false);
    }
    

    Instead of just

    document.getElementById('fileinput').addEventListener('change', readMultipleFiles, false);
    

    Edit: So yeah, the solution was here

    execute chrome with chrome.exe --disable-web-security for windows or google-chrome --disable-web-security for linux.

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

Sidebar

Related Questions

Basically my problem is that i've adapted a piece of code found here http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/62e70670-f306-4bb7-8684-549979af91c1
Here is my code: $('#right').load('textes.html #nicolas'); $('#right').load('textes.html #antoine'); The problem is that the content
Here is the code that cause me problem since few hours: TabItem newTab =
Here is the smallest amount of code that clearly illustrates my problem: <html> <body>
Here a code to demonstrate an annoying problem: class A { public: A(): m_b(1),
Trying to truncate some code here and running into a problem: <script type=text/javascript> $(function()
Here is the problem from code chef : A set of N dignitaries have
here is my problem : The code (FooController) : NSString *path = [[NSBundle mainBundle]
Here is my code, everything is working fine the only problem is with the
I found this code from here: http://www.cssportal.com/form-elements/text-box.htm But the problem is you can still

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.