469,357 Members | 1,691 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,357 developers. It's quick & easy.

Making an two images automatically alternate

I have two .gif images that I want to automatically alternate instead of only on a mouseover. Here's the coding so far:

[HTML]<CENTER>
<A HREF="http://en.wikipedia.org/wiki/Christmas"
onmouseover="document.mybutton2.src='redgreen.gif' ;"
onmouseout="document.mybutton2.src='greenred.gif'; "><BR>
<IMG SRC="greenred.gif" width="600" height="150"
border="0" name="mybutton2"></A>
</CENTER>
[/HTML]
Anyone know how to make it on a timer or something to auto switch the images?
Nov 27 '07 #1
1 1365
acoder
16,027 Expert Mod 8TB
Use setInterval.
Nov 27 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by |-|erc | last post: by
4 posts views Thread by VR | last post: by
8 posts views Thread by Amanda H. | last post: by
61 posts views Thread by phil-news-nospam | last post: by
11 posts views Thread by Jason Camp | last post: by
6 posts views Thread by Chris Nelson | last post: by
14 posts views Thread by windandwaves | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.