3

I am currently working on a Spring project and I need some help. In my JSPs pages I am using spring form tags. For example:

<form:input size="30" type="file" path="attachment" />

I need to know how can I give this tag an option to overwrite the word "browse", so that I can use tag to call different text from .properties file. I've tried to use title, and value options and it never worked.

The reason I need to do it is to show "voir" in case of French language, "浏览" in case of Chinese, and so on.

Adeel Ansari
  • 39,541
  • 12
  • 93
  • 133
Ali Taha Ali Mahboub
  • 3,271
  • 6
  • 26
  • 25
  • 1
    I can't understand the question at all. – Bozho Dec 06 '10 at 10:11
  • 1
    Bozho, Ali wants to create button that opens browse dialog but has custom label. For example imagine button with lable "Press to attach your file" that opens browse dialog. IMHO it is impossible. This is under browser's control. – AlexR Dec 06 '10 at 10:15
  • @AlexR: Not really. Have look at the thread link, I posted as an answer. – Adeel Ansari Dec 06 '10 at 10:25
  • possible duplicate of [Labeling file upload button](http://stackoverflow.com/questions/686905/labeling-file-upload-button) – Frankie Dec 06 '10 at 10:32

1 Answers1

5

It is normally provided by the browser and hard to change, so the only way around it will be a CSS/JavaScript hack, see this SO thread.

Community
  • 1
  • 1
Adeel Ansari
  • 39,541
  • 12
  • 93
  • 133
  • with your rep pointing to another thread should be done in the proper way (close as duplicate) or, at least, with a more elaborate answer. – Frankie Dec 06 '10 at 10:38
  • @Frankie: How about this ;)? However, my answer was not qualifying for a negative, though. But its okay, as you like it. – Adeel Ansari Dec 06 '10 at 10:55
  • that comes close to what I was expecting from a pro user like yourself! ;) Vote updated. – Frankie Dec 06 '10 at 11:10