IntelliJ Java IDE
The moose likes HTML, CSS and JavaScript and the fly likes type=file control Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "type=file control " Watch "type=file control " New topic
Author

type=file control

Ravi Shankar
Greenhorn

Joined: Apr 07, 2003
Posts: 26
Hi
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
Ravi
Eric Pascarello
author
Rancher

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

Joined: Jan 10, 2002
Posts: 50677

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.
hth,
bear


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
IntelliJ Java IDE
 
subject: type=file control
 
Threads others viewed
Folder Picker
File upload filter
Uploading both local and hosted files
Selecting a Directory in Input type = file
Present User with Openfile Dialog Box
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture