Re: T5 getElementById from Layout component

2008-02-08 Thread Baofeng Yu
Thanks for all your replies ... Finally fixed the problem by looking at the generated html source file. The problem was actually not with calling the div from the head of layout.tml. Because after the page is rendered, all the elements are available, so there is really no problem there. But fo

Re: T5 getElementById from Layout component

2008-02-08 Thread Chris Lewis
If all of this is within your start page, then it's quite easy. T5 is built around the Prototype JS lib, which you can get a feel for here: http://www.prototypejs.org/ (api here: http://www.prototypejs.org/api). It is a staggeringly simply library to use. Now you'll have to test this, but I'm

Re: T5 getElementById from Layout component

2008-02-08 Thread Andreas Andreou
The problem is that when the script is executed, there's no such element (yet) Either delay its execution by wrapping with something like dojo.addOnLoad (prototype should provide a similar helper) or move the script at the very end of the html file, just before On Feb 8, 2008 6:08 PM, Baofeng Yu

Re: T5 getElementById from Layout component

2008-02-08 Thread Baofeng Yu
Say I have a layout.tml that contains header, footer, navi menu, and an empty section. Now in start.tml, I do the following: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> ... ... When user selects a radio button on the start page, I want to change the style of div "1". I know th

Re: T5 getElementById from Layout component

2008-02-08 Thread Chris Lewis
What exactly do you want to do? What you're explaining doesn't really make sense - that is, hard-coding a DOM id in a component that doesn't contain such an id. What is your ultimate goal? chris Baofeng Yu wrote: Hi all, I have a layout component that wraps around a page, say Start.tml. Sup