QUOTE(er_satbir @ 11 Oct, 2007 - 05:54 AM)

You should use <input type="image" src="PATH_TO_IMAGE" onClick="jump(this.form)" /> to use image as a submit button.
I wouldn’t use the
input element in this case for two reasons:
- type="image" is functionally equivalent to type="submit"; in other words, type="image" has a submission action tied to it whereas type="button" does not. If the element is contained within a form element, as it is in clyntmyster’s code, then you would have to cancel the default action (i.e., submission action) via scripting which would unnecessarily complicates things.
Notably, I’m not sure whether he should be using that form element at all since he filled in the action attribute with a “dummy” value; I’m not sure if the value is temporary or intended for production. - The input element has no width and height attributes. Admittedly, you can describe those via CSS, but I prefer to specify intrinsic dimensions via HTML instead of CSS since I don’t consider descriptions of the intrinsic dimensions of images to be part of the presentational layer.
Edit: I should mention that you used XML syntax for the
input element. Considering that,
onClick should be in lowercase (i.e.,
onclick) since XHTML element/tag names are written in case‐sensitive lowercase.
This post has been edited by Arbitrator: 11 Oct, 2007 - 11:25 PM