dynamic text using settimeout

S

S.Hoitinga

Hi,

I am trying to create a header on a page that switches between 7 textitems
in an array.
using this code:

<script language="JavaScript">
season=new Array("summer","winter","fall","spring",")
i=0
function raise()
{
setTimeout('i=i+1',2000);
if(i>4){i=0}
}
</script>

</head>

<body onLoad="raise()">
<script language="JavaScript">

document.write(season);
</script>

can anybody please explain me why this doesnot work.

greets,

Sybolt
 
V

Vincent van Beveren

You asked that same question 6 days ago, with a lot of reply. It should
help you enough to get it working.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top