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

  • Home
  • SEARCH
  • 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 8902447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:36:57+00:00 2026-06-15T01:36:57+00:00

I have the following HTML code <label class=fileinput-button id=fileUpload-label> <span class=btn btn-add id=fileUpload-span>Add a

  • 0

I have the following HTML code

<label class="fileinput-button" id="fileUpload-label">
   <span class="btn btn-add" id="fileUpload-span">Add a file..</span>
      <div id="fileinput-outer">
         <input type="file" name="files[]" id="fileUpload">
      </div>
</label>

Then I use Jquery to get the list of files with the Input type= File

$('#fileUpload').live('change', function () {
    $.map($('#fileUpload').get(0).files, function (file) { 
        $('#fileList')
            .append(CreateFileList(file.name, true));
        });
 });

This works great in Chrome and Firefox, however in IE the error is

Unable to get value of the property 'length': object is null or undefined

So I began to troubleshot and have this code

var arrFiles[];
arrFiles = $('#fileUpload').get(0).files;
    if(arrFiles.length === 0) {
        alert('empty');    
    } else {
       alert('has value');    
    }

Chrome and Firefox – the code and alerts work as expected, however IE still throws the error

Unable to get value of the property 'length': object is null or undefined

It seems like IE might have an issue with Jquery Get ..

Anyone know how I can fix this error in IE with or without Jquery ?

  • 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-15T01:36:59+00:00Added an answer on June 15, 2026 at 1:36 am

    jQuery().get works fine, you haven’t broken it. However, there is no files property on <input type=file /> for IE 9, it was introduced in IE 10. See this example http://jsfiddle.net/RtqnZ/

    you are also missing the multiple property on your input

    Reference: http://msdn.microsoft.com/en-us/library/ie/hh772931(v=vs.85).aspx

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

Sidebar

Related Questions

I have the following html code: <form> <table> <tbody> <tr> <td> <span>Quantity<span class=pull-right>3</span> <input
I have the following html code with Jquery Sorting <div class=sortable style='width:700px; margin: 0
I have following HTML code in my JSP page: <label class=txt12Red>Label 1</label> <label class=txt12Red>Label
I have the following UiBinder code: ... <div> <g:Label>Hello,</g:Label> <g:Button ui:field=button /> </div> ...
I have the following html code. <html> <body> <div style=max-width:1600px; min-width:900px; > <table> </table>
I have the following html code (in the given order) <div id=content>...</div> <div id=footer>...</div>
I have the following HTML code based on a tab menu format, i.e: <div
I have the following html code: <table> <tr> <td> <div id=fixmywidth style=position:relative; height:30px;> <div
Given the following HTML fragment: <span name=foo class=foo-class> <input name=foo value=0 id=foo2_0 type=radio> <label
I have several instances of the following HTML on a page: <div class=input radio

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.