Rollover with input type=image

Posted on 2000-03-20
Last Modified: 2012-06-27
I'd like to use a rollover effect with a graphic that I'm using with a <input type=image> tag. I know how to do it using <a href>, but I'd like to use it in a form instead. Can this be done, and if so, how?
Question by:JOK
  • 2
  • 2

Accepted Solution

Deathead earned 100 total points
ID: 2637360
Unfortunately it cannot be doneusing the input tag..
a work around would be to make an href rollover and make it submit the form via javascript
<a href="#" onmouseover="change" onmouseout="changeback" onClick="document.formname.submit()"><img tag></a>

That will get the effect of what you want

Author Comment

ID: 2640272
I was afraid of that. I'm working with code from someone else and it doesn't look like I can easily change the onClick code.

Oh well, thanks anyways.

Expert Comment

ID: 2640420
if you post the code I could help you out...

Author Comment

ID: 2640573
What I've got works. But like I said, there's a bunch of stuff with the onClick now and I don't want to mess with it too much. Thanks anyways.

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Set differnt row widths in a table. 3 22
How to make footer stick to bottom 9 31
Place text over image using CSS 6 44
Diminish Pop-up  in 3 seconds 7 21
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question