File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes type=file control Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "type=file control " Watch "type=file control " New topic

type=file control

Ravi Shankar

Joined: Apr 07, 2003
Posts: 26
I would like to know how we can change the background color of the browse button for the INPUT type=file control.
Thanks in advance
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
I do not think it can be done from my knowledge of playing around with forms in the past.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

Eric is correct; it cannot be done. Which really really sucks because it makes it impossible to make the file control look like the rest of a web site design.
I have heard tell of someone putting the file contol in a hidden div and using other controls to emulate and control it through Javascript. I spent an afternoon a few months back trying to get something like this to work and was unsuccessful.
You might want to google around and see if you can find some info on this tactic.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: type=file control
It's not a secret anymore!