• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Problem with html image tag inside input tag

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
bacon. tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic