hange the text of browse button in file upload control

L

lale.kat

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", 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.

<html>
<head>
<title>File Upload Example</title>
<script language="JavaScript" type="text/javascript">
function HandleFileButtonClick()
{
document.frmUpload.myFile.click();
document.frmUpload.txtFakeText.value =
document.frmUpload.myFile.value;
}
</script>
</head>
<body>
<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" >
</form>
</body>
</html>
-----------------
 
J

Jonathan N. Little

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", 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.

<snip javascript hack>

Good Firefox! Anyway what happens if the user has JavaScript disabled?
What not use the dependable recommended method?

<label for="MyFile">Upload File: </label>
<input type="file" name="myFile" id="myFile">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top