• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

customizing button image for file upload using struts

 
sai kinnera
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Anybody tried to give the customized "Browse" image for the file upload control using Struts. I am using FormFile object of the struts for uploading, which is not allowing me to attach my own "Browse" image. This is just to keep the uniform user interface, because I have some other "Browse" buttons in that page. Any help is very much appreciated.
Thanks,
sai kinnera
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have faced to this issue before. However, after several searching from the web, our conclusion is, we CANNOT customerize the Browse button if we make use of the tag <input type="file" ... >.

One article from Microsoft mentions that, in IE 4, we can use a gif as browse button. When this button is clicked, it invoke a JS to set the value of the file. However, this *property* is intentionally disabled in IE 5 and later versions due to the security issues. Netscape has disabled this feature as well. Thus, we have no way to customize the browse button.

Nick
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic