How to hide the text field in the Html file download

advertisements

I am wondering how to hide the text field portion of a standard html file upload tag

for example

<input type="file" name="somename" size="chars">

This generates obviously a text field and next to that field is a browse button... I want to hide the text field part but keep the button.


I'd recommend hiding the whole thing and putting a separate button object which, when clicked, will end up clicking the input's browse button.

You can do this with CSS and javascript -- check out this article (actually the second time I've used this reference today).