I was wondering, is there a way to have the rollovers on my page show the 'over' image using a timer? Im trying to get the buttons to all flash once, in succession, when a user enters the page.
click on scripts and look into chapter 3 - specifically creating cycling banners. thsi will show you how tro use a timer for changing images. --------------------------------------------------
Goals are dreams with deadlines
now for the same stuff except more easily scalable and with no respect for older browser :
<html>
<head>
<script>
var delai = 50; // milliseconds between each change.
var currImg = 0; // tells us wich image we are on
function imageEffect()
{
if (currImg > 0)
{
// set last image back to original src.
var img = document.images[currImg-1]
var other = img.getAttribute("otherSrc"
img.setAttribute("otherSrc", img.src)
img.src = other
}
if (currImg < document.images.length)// stops us from going on forever
{
// sets image to new src
var img = document.images[currImg]
var other = img.getAttribute("otherSrc"
img.setAttribute("otherSrc", img.src)
img.src = other
// tells us to do the same but with the next one in line
currImg++
// repeat this function for the next image
setTimeout("imageEffect()", delai)
}
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.