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

Tony Fleig tony.fleig at gmail.com
Mon Jan 31 20:57:55 UTC 2011


+1

I would like to know the answer to this as ell.

TF

On Mon, Jan 31, 2011 at 12:44 PM, Paul DeBruicker <pdebruic at gmail.com> wrote:
> Hi -
>
> Using jQuery/AJAX & Seaside 3.0.3 I'm trying to check for the results of a
> calculation and when its complete update a div and then stop checking
> without doing a full page refresh.  I can do everything but stop the
> periodic process without doing a refresh
>
> If I have an inst var named 'count' and do this:
>
> renderContentOn: html
>        (html div)
>                id: 'replace';
>                script:  ((html jQuery id:'replace')
>                                        load html: [ :h |
>                                                count := count + 1.
>                                                (html div)
>                                                id: 'replace';
>                                                with: [ html render: 'count:
> ' , count greaseString ] ] ;
>                                        interval: 2 seconds).
>
> every two seconds the count is increased and then displayed.   If I use
> replaceWith: I have the same problem.  The only thing I know to stop the
> periodic process is to refresh the page and just render the results I had
> been waiting on.
>
> I would like to use AJAX, rather than refresh so I can do this in several
> places on a single page.
>
> Its my understanding that the setInterval function has an id that can be
> sent to clearInterval but I don't know how to get the function id through
> Seaside.  Is there a way to get that id and send it to clearInterval or
> another way to do what I want?
>
> Thanks
>
>
> Paul
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the seaside mailing list