Hi. I applied this onclick example to a panel.But when i clicked on the panel's items onclick event fired.
How can i seperate onclick events of the panel and the panel's items?
Printable View
Hi. I applied this onclick example to a panel.But when i clicked on the panel's items onclick event fired.
How can i seperate onclick events of the panel and the panel's items?
The second parameter in the click event handler is the target element, which you can use to determine what the user clicked on.
Hi? i have a div tag with onclick event in html. i need to add this html to panel and when i click on div, i need this event get triggered. how do i do this?
Code:var table = '<table>';
table += '<div onclick="alert(\'outer\');" id="div1"><tr><td>';
table += '<h1>Hello</h1>';
table += '</td></tr></div></table>';
Ext.define('MyApp.view.ui.MyPanel', {
extend: 'Ext.panel.Panel',
html: table,
initComponent: function () {
var me = this;
me.callParent(arguments);
}
});