try

document.timer = function() {
       tapestry.form.submitAsync("update");
       setTimeout(document.timer, 5000);
}
setTimeout(document.timer, 5000);

On Sat, Sep 27, 2008 at 1:58 AM, Norman Franke <[EMAIL PROTECTED]> wrote:
> I'm using Tapestry 4.1.2 and I'm attempting to get a JavaScript timer to
> periodically refresh a block on my page. This is that block:
>
> Page load time: <span jwcid="@Insert" value="ognl:value">Value</span>
>
> <form jwcid="[EMAIL PROTECTED]" updateComponents="updateDiv" async="true">
>
> <div jwcid="[EMAIL PROTECTED]">
>        Refreshed time: <span jwcid="@Insert" value="ognl:value">Value</span>
> </div>
>
> <input jwcid="@Submit" value="Update"/>
> </form>
> <SCRIPT language="JavaScript">
> dojo.require("tapestry.form");
>
> function timer() {
>        tapestry.form.submitAsync("update");
>        setTimeout(timer(), 5000);
> }
> setTimeout(timer(), 5000);
> </SCRIPT>
>
> The problem is this doesn't work. It gets an error "this.forms[formId] is
> undefined". I tried a few other things, which resulted in recursion errors
> (Firefox 3).
>
> How can I do this?
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to