title: Fire javascript event onchange event of <input type="file"/>
body: <p>I have this code </p>
  
  <pre><code>&lt;input id="fileupload" 
         type="file" name="files[]" 
         class="inputFile clickable" 
         onchange="uploadFile(this.value)"/&gt;
  </code></pre>
  
  <p>This works fine on second time using it, i.e. first time I select the file the onchange event does not fire, but selecting file for the second time works fine.</p>
  
  <p>Is there any thing which I can change here?</p>
  
  <p>I have tried:  </p>
  
  <ul>
  <li><code>onlclick</code> (doesn't work, fires before selecting file)<br/></li>
  <li><code>onblur</code> (doesn't work, doesn't fire at all, plus even if does, its just stupid to click somewhere else on page to fire the operation)<br/></li>
  <li><code>onselect</code> (doesn't work)<br/></li>
  </ul>
  
  <p>Additional info:
  If I use <code>onchange=alert(this.value)</code> it works fine</p>
  
  <p>this is my javascript code</p>
  
  <pre><code>function uploadFile(value) {
       alert(value); //works fine
      $('#fileupload').fileupload({
          dataType: 'json',
          url: 'fileUpload.php',
          type: 'POST',
          limitConcurrentUploads: 1,
  //        done: function (e, data) {
  //            $.each(data.result, function (index, file) {
  //                $('&lt;p/&gt;').text(file.name).appendTo(document.body);
  //            });
  //        },
          success: function() {
              showMultipleDataDiv(value); //but I don't get value here
          }
      });
  }
  </code></pre>