[thelist] Styling <input type="file">

Dan Williams dan at ithium.net
Fri Dec 12 12:11:29 CST 2003


I have a problem whereby I want to style a file upload input box. It seems
that it just will not play ball. Every time I set the border etc. it goes
weird - and there does not seem to be a way to style the button.
 
So, my alternative plan is this. I create a normal text box and button,
styled the way I want, and make the file box invisible. Then, when my button
is clicked, I trigger the file box button, and once the result has come
back, I update the textbox with this. Similarly, every time the text box is
changed, I update the file box.
 
My question is basically, is this a good idea? ...is there a way to properly
style the file box, that I am missing? And also, how to I trigger the Browse
button of the file box? I assume that the file box supports onchange, so
when either one triggers an onchange event, I'll update the value property
of the other.
 
Ideas?
 
Cheers
 
Dan
 
 


More information about the thelist mailing list