Hello, I have a div on a timer below, but I don't know how to test if it is working. It is updating every 10 seconds, but since the text is the same, "test" nothing appears to be happening when it probably is. How can I add something to this so I can see some action every 10 seconds. I need to keep the div as the thing that is updating every 10. Thank you very much~~ <script type="text/javascript"> function change() { content = document.getElementById("content"); setTimeout('change()',10000); } </script> </head> <body> <div class="main" style="border: 5px solid rgb(0, 0, 0);"> <div class="body"> <div id="content">test</div> </div> </div> </body> </html>
Errr... it's not doing anything right now. You have to call the change function before it does anything. I'm not sure what you are trying to do here. When I'm trying to see if a function is working properly, I add an alert box with the JavaScript variables I'm monitoring. Add it on the line just after your setTimeout method. When you call the function, you should see the alert box pop up 10 seconds later.