Click here to Skip to main content
Licence 
First Posted 23 Apr 2004
Views 37,275
Bookmarked 7 times

Image Submit Button

By | 23 Apr 2004 | Article
Submitting forms in javascript.

Introduction

This is the code for how to use an image as a submit button. Remember to include a name or id attribute in the form tag at the beginning. Also, make sure that you change form_name to the form name or id attribute. Change image_name.extension to the name of the image. Make sure that you spell everything correctly to ensure that the code does it right. This is cool for buttons that look bad on certain browsers or operating systems.

<a href="javascript:document.form_name.submit();"><img src="image_name.extension"></a>

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

videogames



United States United States

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 24 Apr 2004
Article Copyright 2004 by videogames
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid