Skip to content Skip to sidebar Skip to footer

Javascript Timer Runs Sporadically

I am developing a messaging system and through discussion here: webBrowser.Document.Write() Irregular Performance I decided to rewite some of the core login in my program in Javasc

Solution 1:

Did you check the console in Firefox or Chrome? I checked it out and got an error when clicking "Add a message from Jack"

UncaughtReferenceError: black is not defined
switchColorindex6.html:74
(anonymous function)

Is black a variable that should be defined?

Solution 2:

On lines 74 and 76 you have black not quoted, e.g.

        if (!elements[i].style.color!=black)

Try quoting it:

if (!elements[i].style.color!="black")

Solution 3:

You have some errors in lines 72-78. One is that you compare color to black which is undefined. Probably it should be 'black'. Second is elements[i].stlye on line 76.

Post a Comment for "Javascript Timer Runs Sporadically"