Submit buttons with rollover images

The image_submit_button helper makes it easy enough to use images as
submit buttons, but they don’t have any rollover effects. I’ve seen
various JS approaches to make this work, but I’m wondering if there’s
a preferred Rails way to do this.

Has anyone seen a replacement for image_submit_button that takes two
(or three) images instead of one, and creates the rollover code?

Michael

Michael S. wrote:

The image_submit_button helper makes it easy enough to use images as
submit buttons, but they don’t have any rollover effects. I’ve seen
various JS approaches to make this work, but I’m wondering if there’s
a preferred Rails way to do this.

Has anyone seen a replacement for image_submit_button that takes two
(or three) images instead of one, and creates the rollover code?

Michael

This is the “rails” aproach…

<%= image_submit_tag “btn-off.jpg”, :mouseover => “btn-on.jpg”%>

:slight_smile:

Regards