[Seaside] Clear/stop a periodic javascript process using Seaside?

Johan Brichau johan at inceptive.be
Tue Feb 1 21:20:40 UTC 2011


Hi Paul,

On 01 Feb 2011, at 15:18, Paul DeBruicker wrote:

> If I created multiple intervals on the same page, would the correct one get cleared without passing unregisterInterval the correct value for updateId?  My knowledge of JS is less than Smalltalk.

No, because the id is in a global variable, there can only be one. But you can use a javascript array as a dictionary where the key is the id of the DOM element and the value is the interval id.

> I think I can figure out how to store the updateId using the jQuery.data() function on the DOM element that is updating then send the clearInterval with the result of the calculation and have it get the updateId from the DOM element.

Yes, that would probably work too, and maybe is even cleaner.

cheers
Johan


More information about the seaside mailing list