<p>If I have a </p>

<pre><code>&lt;input id="uploadFile" type="file" /&gt;
</code></pre>

<p>tag, and a submit button, how do I determine, in IE6 (and above) if a file has been selected by the user.</p>

<p>In FF, I just do:</p>

<pre><code>var selected = document.getElementById("uploadBox").files.length &gt; 0;
</code></pre>

<p>But that doesn't work in IE.</p>

This works in IE (and FF, I believe):
```
```
if(document.getElementById("uploadBox").value != "") {
   // you have a file
}
```
```