Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:file tag and custom image

 
Elie Hirschman
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there!
I am newish to Struts and have not found a way to allow a custom image appear for the browse button when using in a form.
Here is the code I have tried in my jsp:


Can anyone help?
 
Elie Hirschman
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I could not accomplish this. So I gave up.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a link to the same question posed in another forum. The respondent shows a clever way to do this. I haven't tried it, but you might want to give it a go.

Since you're using Struts, you could replace their line:

<input type="file" name="browse" style="display:none;">

with

<html:file property="theFile" style="display:none;" />

Just make sure you replace all references to "browse" in their javascript with "theFile".
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic