I believe the difference is that addInit
adds your javascript on an onLoad event handler of the current page. while addScript adds your javascript at the very bottom of the page (last element before closing body), within a <script> tag in which many components of the current page can add javascript there. I think the difference is the moment when javascript will be executed, with addInit in the moment the page finishes loading and with addScript whenever the browser reaches the <script> tag. as i see it, javascript added with addScript is executed before the one added with addInit. hope that helps, and hope not being wrong :) cheers Nicolás.- On Tue, Nov 9, 2010 at 5:07 AM, iberck <ibe...@gmail.com> wrote: > > Hello forum, I have a question > > What is the diference between renderSupport.addInit(); and > renderSupport.addScript(); > since two methods adds a javascript function that runs on dom loaded > > Thanks in advance > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Diference-between-addInit-and-addScript-tp3256418p3256418.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >