View Single Post
Old 03-08-2013, 08:24 AM   PM User | #3
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,452
Thanks: 0
Thanked 498 Times in 490 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Try moving the JavaScript to just before the </body> tag where most JavaScript belongs.

Moving the script will fix your problem because with the script at the top it tries to run before the HTML has loaded when it is already cached by the browser.

You should also fix the setInterval call - it expects a function not a string in the first parameter.

window.setInterval(cycle1,3000);
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is online now   Reply With Quote