Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
November 28, 2007, 6:40 am
rate this thread
in firfox,for example insted of being "browse" be "upload file", how
can I do that?
Is it possible ?I found a code that only works in IE but it doesent
work in fireFox, I want to work in both of them.
<title>File Upload Example</title>
<form name="frmUpload" encType="multipart/form-data">
<!-- Real Input field, but hidden-->
<input type="file" name="myFile" style="display: none">
<!-- Fake field to fool the user -->
<input type="text" name="txtFakeText" readonly="true">
<!-- Button to invoke the click of the File Input -->
<input type="button" onclick="HandleFileButtonClick();"
value="Upload File" >
- Jukka K. Korpela
November 28, 2007, 10:45 am
Re: change the text of browse button in file upload control
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.
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
And here you make the entire file input non-functional to all users who
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")