Discussion:
input type="file" id="theFileControl"
(too old to reply)
greg
2003-10-02 17:50:44 UTC
Permalink
I have a quick question.
I have
<input type="file" id="theFileControl"/>
This works. But I have 2 issues.
is there a way to assign the SLEF a value to start with:
I have tried this
document.all.theFileControl.value = "yyyy";
and it doesn't work.
second:
is there a way to add file extensions in the popup dialog. So if I want to
just see *.CHM files?
thanks in advance

My full code is this:
<HTML>
<BODY>
<p>
<input type="file" id="theFileControl"/>
</p>
<script lang="JScript">
alert("xxx");
document.all.theFileControl.value = "yyyy";
</script>
</BODY>
</HTML>
Chocawok
2003-10-28 04:03:38 UTC
Permalink
I've looked into this before and I think the answer is no. You cant filter.
At least not cross browser.

Not a lot of help I know.
Post by greg
I have a quick question.
I have
<input type="file" id="theFileControl"/>
This works. But I have 2 issues.
I have tried this
document.all.theFileControl.value = "yyyy";
and it doesn't work.
is there a way to add file extensions in the popup dialog. So if I want to
just see *.CHM files?
thanks in advance
<HTML>
<BODY>
<p>
<input type="file" id="theFileControl"/>
</p>
<script lang="JScript">
alert("xxx");
document.all.theFileControl.value = "yyyy";
</script>
</BODY>
</HTML>
Loading...