Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FILE INPUT default value

Status
Not open for further replies.

MikeT

IS-IT--Management
Feb 1, 2001
376
US
On one of my intranet pages I want my users to browse for file w/ a .dbf extension. I would like the Browse window to filter by this extension automatically. I've found that if I type "*.dbf" into the form element, then hit the Browse button, it will filter. However, I can't set a VALUE attribute for the INPUT element so the users don't have to type it all the time i.e.:

Code:
<input type=file name=myname value=&quot;*.dbf&quot;>

That does not work. Are there any attributes for the FILE INPUT tag that will allow me to filter?
 
hi MikeT,

sorry - it's read only. from Javascript; the Definitive Guide 3rd edition:

&quot;To prevent malicious programs from uploading arbitrary files from the client, this property may not be set by JavaScript code. Similarly, the VALUE attribute of the <INPUT> tag does not specify a default value for this property.&quot;
======================================

if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top