Jump to content

Form Submit


Shinji

Recommended Posts

You can use an input element with type="image", or just an image element for that. But at least you would be applying onclick attributes to define it as a submitter.

<input type="image" src="..." onclick="this.form.submit()" />
Or:
<img src="..." width=".." height=".." onclick="document.forms['MyForm'].submit()" />
Notice the red will be the reference to the name in your form element. The "this.form" part of the input element's onclick is to refer to that element's form, elements that don't belong to a form like the <img /> don't also have a "this.form" so they should target it by using the document.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...