T
Terry
I am trying to create a ticker that goes from 0 to 9, when hitting 9
resets to 0 and repeats. Unfortunately my attempt just hangs after
displaying "0" to the browser and alerting "1". Any suggestions would
be appreciated on how to do what I am trying to do.
the url to my page where I am doing this is:
http://theamazing.onlinewebshop.net
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">
<html>
<head>
<title>ticker</title>
<script type="text/javascript">
var x = 0;
var y = 1;
function ticker(){
document.write(x)
x = x +1;
if (x == 9)
x = 0;
alert("x = " + x);
}
</script>
</head>
<body>
<script type="text/javascript">
setInterval(function() { ticker.call(this); },1000);
</script>
</body>
</html>
resets to 0 and repeats. Unfortunately my attempt just hangs after
displaying "0" to the browser and alerting "1". Any suggestions would
be appreciated on how to do what I am trying to do.
the url to my page where I am doing this is:
http://theamazing.onlinewebshop.net
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">
<html>
<head>
<title>ticker</title>
<script type="text/javascript">
var x = 0;
var y = 1;
function ticker(){
document.write(x)
x = x +1;
if (x == 9)
x = 0;
alert("x = " + x);
}
</script>
</head>
<body>
<script type="text/javascript">
setInterval(function() { ticker.call(this); },1000);
</script>
</body>
</html>