Reputation: 629
.
how to change the "no file chosen" text in this image Please help to me. thanks & regards chakri
Upvotes: 1
Views: 14541
Reputation: 555
I have used CSS to hide the default text and used a label to show the new text. Have a look- http://jsfiddle.net/ZDgRG/
Choose fileinput[type=file]{
width:90px;
color:transparent;
}
window.pressed = function(){
var a = document.getElementById('aa');
if(a.value == "")
{
fileLabel.innerHTML = "Choose file";
}
else
{
var theSplit = a.value.split('\\');
fileLabel.innerHTML = theSplit[theSplit.length-1];
}
};
Upvotes: 4