Turns out one needs quotes around the document.timer() statement,
otherwise it tries to execute the function in the call to set the
timer. Perhaps a better error message could be provided? I think that
Tapestry hadn't yet registered the form which led to the error.
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Sep 29, 2008, at 11:14 AM, Norman Franke wrote:
Same error: this.forms[formId] is undefined in dojo.js
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Sep 26, 2008, at 7:13 PM, Andreas Andreou wrote:
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:valueValue/
span
form jwcid=[EMAIL PROTECTED] updateComponents=updateDiv async=true
div jwcid=[EMAIL PROTECTED]
Refreshed time: span jwcid=@Insert
value=ognl:valueValue/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]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]