Skip to content Skip to sidebar Skip to footer

How Can I Attach A Change Event Handler To A Variable?

Possible Duplicate: Listening for variable changes in JavaScript or jQuery How can I track if this variable has changed? var ConditionalFlag = 0; I tried this: var ConditionalF

Solution 1:

There's no "event" that gets triggered when a variable changes. JavaScript doesn't work that way.

When does this variable get changed? Just add a call to a function after it does.

Post a Comment for "How Can I Attach A Change Event Handler To A Variable?"