Scripsit lale.kat (AT) gmail (DOT) com:
Quote:
Hi.I want to change the text of browse button in file upload control
in firfox,for example insted of being "browse" be "upload file", |
Stop wanting that. File input is more or less mysterious to most people
as it is, so there is no way to take extra effort to obfuscate it more.
Not in HTML.
Quote:
I found a code that only works in IE but it doesent
work in fireFox, I want to work in both of them. |
It plays with JavaScript, so it's off-topic here. And as said, it's a
bad idea anyway.
Specifically, "upload file" would be grossly misleading, since clicking
on the button does not upload anything. It's for _choosing_ a file for
upload. Much as the word "Browse" (or equivalent text in another
language) says.
Quote:
input type="file" name="myFile" style="display: none" |
And here you make the entire file input non-functional to all users who
have a CSS-enabled, JavaScript-disabled browser. So the approach was
wrong. If it really made sense to try to change the button text, you
would try to do that directly using scripting or you would use a script
to generate the scripting-based widgets for it, using <noscript><input
type="file" name="myFile"></noscript> as a fallback.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/