T5: call Javascript after Tapestry.init()

2008-11-21 Thread Nick Davies
Hi, Apologies if I'm being dull here, but I'm trying to trigger an AJAX call automatically once a page has finished loading - the idea is that the main page is cached and a small amount is re-rendered each time. Obviously, this needs to happen after the call to the Tapestry.init() javascript

Re: T5: call Javascript after Tapestry.init()

2008-11-21 Thread Fernando Padilla
Yeah. I saw that too. I was wondering if the zone init stuff should happen before any user defined javascript as well. Nick Davies wrote: Hi, Apologies if I'm being dull here, but I'm trying to trigger an AJAX call automatically once a page has finished loading - the idea is that the main

Re: T5: call Javascript after Tapestry.init()

2008-11-21 Thread Yunhua Sang
You can use Function.defer() from Prototype to make your JavaScript call after Tapestry.init() (actually when the intepretor is idle). The problem is functions within Tapestry.init are not ordered, I don't know if this should be considered a bug. On Fri, Nov 21, 2008 at 1:41 PM, Fernando

Re: T5: call Javascript after Tapestry.init()

2008-11-21 Thread Howard Lewis Ship
You can use RenderSupport.addScript() ... and then on the client-side use the Protoype Function.defer. defer() is a function on Function, i.e. function() { loadSomeStuff }.defer(); The function gets executed a little bit later, i.e., after a few milliseconds delay. Please check the Prototype