putting an image on a button without making it act as submit

liunx

Guest
I need to place an image over a button but the problem is when I make the input type "image" it acts as a submit button, which is not desired. I've tried just putting an image that on click calls a js function, but the problem is that when the cursor is over it, it's not a hand cursor. Is there a way to make a button of any type I need, and place and image over it? Thank you.<!--content-->If you use a regular anchor around the image, you will get the hand cursor and be compatible with version 4 browsers.<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#" onclick="...;return false"><img ... border=0></a><br />
You can also use CSS to make the cursor do what you want.<br />
<img ... style="cursor: pointer; cursor: hand"><!--content-->What I do is just have a rollover image that will change when the mouse is moved over the button. I use image ready to create these rollover buttons. (you can use which ever image editing program you feel comfortable with that supports rollover images ):cool: <br />
<br />
when I have the desired button ready, I just have a <a href=http://www.webdeveloper.com/forum/archive/index.php/"whatever.htm" onmousemove="your_over_script" onmouseout="your_return_script"> ><img src="images/your_image"></a> tag.<!--content-->Thanks. And what about making the image do the same functionality of the button as in Reset?<!--content-->I am not too knoledgeble about input forms so I was only guessing.<!--content-->... onclick="document.formName.reset();return false" ...<!--content-->
 
Back
Top