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 TouchToneTommy 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"> prevent user input

Status
Not open for further replies.

MartinDurant

Programmer
Jan 25, 2002
41
GB
I am new to javascript and am using it just for form validation at the moment.

Can I prevent a user from entering text into the text box part of a "file" type input? I want to ensure that the filename is correct by forcing the user to use the browse part of the control.

Is this possible?

Thanks

Martin.
 
A little too effective. I cannot use the Browse button now. Is there a halfway house that locks the text box, but allows use if the Browse button?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top