DrupalBin
Submit Code
About
Recent Posts
Fix for Code
6 hours 5 min
ago
Fix for Code
6 hours 5 min
ago
Code
6 hours 11 min
ago
whole thing
7 hours 2 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Gloria JavaScript
View
Download
Fix
August 19, 2008 - 10:47pm —
Rob Loach
<html>
<head>
<title>
setInterval/clearInterval example
</title>
<script
type
=
"text/javascript"
>
var intervalID;
var frameID = 1;
function LoadDoc()
{
intervalID = setInterval(CycleThrough, 1000);
}
function CycleThrough()
{
frameID++;
if (frameID > 5) frameID = 1;
var elem = document.getElementById("theThing");
elem.innerHTML = frameID;
}
</script>
</head>
<body
onload
=
"LoadDoc();"
>
<div
id
=
"theThing"
>
1
</div>
</body>
</html>