View Full Version : Change content

14 Sep 2010, 6:03 AM
Hello everyone,

Can someone tell me how I can add a button in a XTemplate?

var tpl = new Ext.XTemplate(
'<tpl for=".">',
'<div class="tpl">',
'<h2>Gezocht: <a href="#">{titel}</a></h2>' ,
'<div class="bodyvacature">',
'<p><i>Categorie:</i> {categorie}</p>' ,
'<p><i>Opleiding: </i>{opleiding}</p>' ,
'<p><i>Uren per week:</i> {upw}</p>',
'<p><i>Publicatiedatum:</i> {publicatiedatum}</p>' ,

I would like a button under "Publicatiedatum" and when I press the button, an handler or listener or what works (sorry I do not know what I have to use) will catch the click and will redirect to a panel which will be filled with a form.

Hope someone knows..

14 Sep 2010, 7:05 AM
Ext JS Button?

14 Sep 2010, 7:11 AM
Yeah probably ^^ but I would really appreciate a simple example. Sorry maybe it sounds stupid, but I am not understanding it 100 %.

So a simple panel with a button with an handler/listener which will change the text in the body would be great.