As code below, click 'test two' then you will see JS Error
<zk>
<tabbox width="400px" id="tbx">
<tabs>
<tab label="Tab 1" />
<tab label="Tab 2" />
</tabs>
<tabpanels>
<tabpanel id="tp">
This is panel 1
<button id="btnOne" visible="false">
<attribute name="onLater"><![CDATA[
System.out.println("button one on later");
]]></attribute>
</button>
</tabpanel>
<tabpanel id="tp2">
<button id="btnTwo">
<attribute name="onLater"><![CDATA[
System.out.println("button two on later");
]]></attribute>
</button>
</tabpanel>
</tabpanels>
</tabbox>
<button label="test one">
<attribute name="onClick"><![CDATA[
Events.echoEvent("onLater", btnOne, null); //echo an event back
]]></attribute>
</button>
<button label="test two">
<attribute name="onClick"><![CDATA[
Events.echoEvent("onLater", btnTwo, null); //echo an event back
]]></attribute>
</button>
</zk>