By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,730 Members | 1,546 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,730 IT Pros & Developers. It's quick & easy.

forms: img submit button: can u do rollovers??

P: n/a

I have a form in which submit button is an img.. would like to do it
w/a rollover, but can't get rollover to work.. can you do rollovers
w/img submit buttons? this is code I have:

<input type="image" name="log" src="images/login.gif" value="Submit"
alt="Submit"
onMouseover = "log.src='images/login-roll.gif'"
onMouseout ="images/log.src='login.gif'">

thank you..

Frances

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


Frances Del Rio wrote:

I have a form in which submit button is an img.. would like to do it
w/a rollover, but can't get rollover to work.. can you do rollovers
w/img submit buttons? this is code I have:

<input type="image" name="log" src="images/login.gif" value="Submit"
alt="Submit"
onMouseover = "log.src='images/login-roll.gif'"
onMouseout ="images/log.src='login.gif'">


Try
<input type="image"
src="images/login.gif"
onmouseover="this.src = 'images/login-roll.gif';"
onmouseout="this.src = 'images/login.gif';"
alt="submit"
value="submit">
with modern browsers like IE5+, Netscape 6/7, Mozilla, Opera 7 I expect
that to work as intended, only old ones like Netscape 4 do not support
onmouseover/out for the input element.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

P: n/a

Martin Honnen wrote:


Frances Del Rio wrote:

I have a form in which submit button is an img.. would like to do it
w/a rollover, but can't get rollover to work.. can you do rollovers
w/img submit buttons? this is code I have:

<input type="image" name="log" src="images/login.gif" value="Submit"
alt="Submit"
onMouseover = "log.src='images/login-roll.gif'"
onMouseout ="images/log.src='login.gif'">

Try
<input type="image"
src="images/login.gif"
onmouseover="this.src = 'images/login-roll.gif';"
onmouseout="this.src = 'images/login.gif';"
alt="submit"
value="submit">
with modern browsers like IE5+, Netscape 6/7, Mozilla, Opera 7 I expect
that to work as intended, only old ones like Netscape 4 do not support
onmouseover/out for the input element.


thank you!! that worked!!

Frances


Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.