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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INPUT TYPE FILE READONLY ?

Status
Not open for further replies.

smnetto

Programmer
Nov 17, 2000
38
0
0
BR
How to prevent users from typing the filename into the text box of an input type file tag, allowing only the browse button to select the file? Any ideas?

 
smnetto,

Is this what you're looking for?

<input name=&quot;myfile&quot; type=&quot;file&quot;>


fengshui_1998
 
Hi fengshui_1998,

No, i want to know how to disable the textbox of this control, to prevent users from type a invalid filename, or a file that not exists.

thanks anyway.
 
smnetto,

You can disable the text box using this...

<input name=&quot;mytext&quot; value=&quot;somedata&quot; onFocus=&quot;this.blur()&quot;>

fengshui_1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top