Can the "Browse..." caption be changed?
-
Assalam-O-Alaikum! Can the "Browse..." caption of the "Browse Button" be changed. I am talking about Take care. Allah Hafiz
-
Assalam-O-Alaikum! Can the "Browse..." caption of the "Browse Button" be changed. I am talking about Take care. Allah Hafiz
-
Hi there, I don't think you can. However, there is a work-around option is to use a normal button which allows you to set whatever you want as its caption, and use a hidden input file element to browse the files on the client machine.
hi, Do u have any available source code/links about this? pls show me. Thanx << >>
-
hi, Do u have any available source code/links about this? pls show me. Thanx << >>
You basically have 3 elements: textbox, button, and hidden input file.
<input id="TextBox1" type="text">
<input type="button" value="Browse Files" onclick="BrowseFile();">
<input id="File1" style="visibility:hidden" type="file" name="File1" runat="server"
onpropertychange="SelectFile();"><script type="text/javascript">
function BrowseFile()
{
document.getElementById("File1").click();
}function SelectFile() { var filePath = document.getElementById("File1").value; document.getElementById("TextBox1").value = filePath; }
</script>
However, this way only works with IE, since in FF the input file element (an instance of the HtmlInputElement with type=file) does not support the
click
method. If you can make it work in FF, I would be interested in knowing how. -
You basically have 3 elements: textbox, button, and hidden input file.
<input id="TextBox1" type="text">
<input type="button" value="Browse Files" onclick="BrowseFile();">
<input id="File1" style="visibility:hidden" type="file" name="File1" runat="server"
onpropertychange="SelectFile();"><script type="text/javascript">
function BrowseFile()
{
document.getElementById("File1").click();
}function SelectFile() { var filePath = document.getElementById("File1").value; document.getElementById("TextBox1").value = filePath; }
</script>
However, this way only works with IE, since in FF the input file element (an instance of the HtmlInputElement with type=file) does not support the
click
method. If you can make it work in FF, I would be interested in knowing how.Thanx for the reply << >>