title: IE 9 jQuery not setting input value
body: <p>my question is simple:</p>
  
  <p>I have an input file field, and i want to limit it to only accept .GIFs via Jquery , and if the format is wrong, set the input value blank.</p>
  
  <p>The problem is that on IE9, the <code>.val('')</code> does not work. Any ideas?</p>
  
  <p>My jQuery: </p>
  
  <pre><code>$('input[type=file]').change(function() {
      var val = $(this).val();
      switch (val.substring(val.lastIndexOf('.') + 1).toLowerCase()) {
      case 'gif':
          break;
      default:
          // error message here
          alert("Wrong Format");
          $(this).val('');
          break;
      }
  });​
  </code></pre>