Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with html image tag inside input tag

 
vandu matcha
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem displaying image on the button tag

[input type="button" value=" [img src='images/arrow.jsp' ] " on click="function1()" / ]

Its not picking up the image value instead it displays whole tag...instead of processing image tag...

any correct way of defining this so that the img tag is processed....
or any other way of displaying an img on the button..

i know that [input type="image" src="path" ]tag is present but it is by default submit button..so after doing the on click funtion it is submitting the form which i dont want to...

Please suggest any other way...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not the way to do that.
Either use an <input type="image" tag or put the image in the body of the button tag.
<button ...><image src=.../></button>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic