View Single Post
  #4 (permalink)  
Old June 10th, 2008, 05:53 PM
Old Pedant Old Pedant is offline
Friend of Wrox
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

You have to *WAIT* for the data to *GET* there!!!!

So if you need to process the *NEW* data in div "A", you have to wait until your "stateChanged()" function has fired!

So two ways:
(1) Just move the code that needs to manipulate the data *INTO* the stateChange() function.

(2) Use setTimeout( ) to repeatedly wait until the data has, indeed, changed.

Number (1) is by far the easier and more logical route.