1

how to change the text "no file chosen" in this below image![][1] .

how to change the "no file chosen" text in this image Please help to me. thanks & regards chakri

Dimitri Dewaele
  • 10,311
  • 21
  • 80
  • 127
chakri
  • 629
  • 3
  • 11
  • 21

1 Answers1

4

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 file
input[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];
    }
};
Chirag Mongia
  • 545
  • 4
  • 12