You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Kevin C. Dorff" <kc...@med.cornell.edu> on 2006/05/04 22:41:55 UTC

Periodic Execution of Javascript in a Tapestry 4 app

I want to periodically execute a Javascript method, based on time
(even if the user isn't doing anything in the browser, as long as the
browser is opened to my page). I have looked at the contrib:Timeout
but it APPEARS it only checks for the timeout if the user is doing
something in the page (moving the mouse, changing form fields,
whatever). I want my stuff to execute even if the user has walked away
from his desk.

It seemed setTimeout was the obvious answer, but, something is eating
the timers, it would appear. Maybe it is Tapestry, maybe it is the
Yahoo widgets (I am using the Yahoo Tree widget on the page).

I also found Prototype.js's PeriodicalExecuter, which is fine because
I use Prototype.js on my page. It doesn't fire events either.

Has anyone else had this problem? I will narrow it down to see if it
is Tapestry that is eating the events tomorrow, hopefully, but, is
there a better way to do this?

Kevin

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Periodic Execution of Javascript in a Tapestry 4 app

Posted by "Kevin C. Dorff" <kc...@med.cornell.edu>.
It must have been some JS error, I shuffled stuff and now everything
is working fine. Very odd. BTW: I decided to go with Prototype.js's
PeriodicalExecuter which is very nice.

Thanks for all your quick help, much appreciated.

Kevin

On 5/4/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> I've used setTimeout/ prototype / and dojo versions of doing loops with no
> problems in tapestry.
>
> Could it be that you are having an internal js error and you just aren't
> seeing it ?
>
> On 5/4/06, Kevin C. Dorff <kc...@med.cornell.edu> wrote:
> >
> > I want to periodically execute a Javascript method, based on time
> > (even if the user isn't doing anything in the browser, as long as the
> > browser is opened to my page). I have looked at the contrib:Timeout
> > but it APPEARS it only checks for the timeout if the user is doing
> > something in the page (moving the mouse, changing form fields,
> > whatever). I want my stuff to execute even if the user has walked away
> > from his desk.
> >
> > It seemed setTimeout was the obvious answer, but, something is eating
> > the timers, it would appear. Maybe it is Tapestry, maybe it is the
> > Yahoo widgets (I am using the Yahoo Tree widget on the page).
> >
> > I also found Prototype.js's PeriodicalExecuter, which is fine because
> > I use Prototype.js on my page. It doesn't fire events either.
> >
> > Has anyone else had this problem? I will narrow it down to see if it
> > is Tapestry that is eating the events tomorrow, hopefully, but, is
> > there a better way to do this?
> >
> > Kevin
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Periodic Execution of Javascript in a Tapestry 4 app

Posted by Jesse Kuhnert <jk...@gmail.com>.
I've used setTimeout/ prototype / and dojo versions of doing loops with no
problems in tapestry.

Could it be that you are having an internal js error and you just aren't
seeing it ?

On 5/4/06, Kevin C. Dorff <kc...@med.cornell.edu> wrote:
>
> I want to periodically execute a Javascript method, based on time
> (even if the user isn't doing anything in the browser, as long as the
> browser is opened to my page). I have looked at the contrib:Timeout
> but it APPEARS it only checks for the timeout if the user is doing
> something in the page (moving the mouse, changing form fields,
> whatever). I want my stuff to execute even if the user has walked away
> from his desk.
>
> It seemed setTimeout was the obvious answer, but, something is eating
> the timers, it would appear. Maybe it is Tapestry, maybe it is the
> Yahoo widgets (I am using the Yahoo Tree widget on the page).
>
> I also found Prototype.js's PeriodicalExecuter, which is fine because
> I use Prototype.js on my page. It doesn't fire events either.
>
> Has anyone else had this problem? I will narrow it down to see if it
> is Tapestry that is eating the events tomorrow, hopefully, but, is
> there a better way to do this?
>
> Kevin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Re: Periodic Execution of Javascript in a Tapestry 4 app

Posted by Mike Snare <mi...@gmail.com>.
Hmm...  I use plain old setTimeout in a few places in my app and
haven't had any problem.  I wouldn't think that the timeout could be
eaten, could it?  The only way to cancel it is to cancel it by the id.

-Mike

On 5/4/06, Kevin C. Dorff <kc...@med.cornell.edu> wrote:
> I want to periodically execute a Javascript method, based on time
> (even if the user isn't doing anything in the browser, as long as the
> browser is opened to my page). I have looked at the contrib:Timeout
> but it APPEARS it only checks for the timeout if the user is doing
> something in the page (moving the mouse, changing form fields,
> whatever). I want my stuff to execute even if the user has walked away
> from his desk.
>
> It seemed setTimeout was the obvious answer, but, something is eating
> the timers, it would appear. Maybe it is Tapestry, maybe it is the
> Yahoo widgets (I am using the Yahoo Tree widget on the page).
>
> I also found Prototype.js's PeriodicalExecuter, which is fine because
> I use Prototype.js on my page. It doesn't fire events either.
>
> Has anyone else had this problem? I will narrow it down to see if it
> is Tapestry that is eating the events tomorrow, hopefully, but, is
> there a better way to do this?
>
> Kevin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org