PDA

View Full Version : EXT JS Image click



rajdev0791
26 Jun 2014, 6:49 PM
1) I want to able to delete the sibling control that is the textfield om clicking. The image button on click is not getting invoked
2) In the handler click i am unable to get the alert on clicking the icon. Assuming we are able to fix that how can i achieve getting the handle to the text field.
items: [{
xtype: 'textfield',
fieldLabel: 'Name',
width: 330,
allowBlank: false,
margin: "5 0 5 5" // Same as CSS ordering (top, right, bottom, left)
}, {
xtype: 'image',
src: '/images/buttonDelete.png',
margin: "0 0 0 5",
listeners: {
'click': {
fn: function () {
alert("custom_event fired");
//this.fireEvent('custom_event', a);
//fire the event with arguments of your choice.
}
}
}
}]

batung007
26 Jun 2014, 8:02 PM
you can show image ?

rajdev0791
27 Jun 2014, 4:21 AM
i am able to see the image

webmaster1001
1 Jul 2014, 11:27 PM
This image is not connect to the link, can you connect again?

vipul.suthar
14 Jul 2014, 8:43 PM
xtype : 'image',
itemId : 'imageId',
src : yourimage
margin : '0 0 5 10',
height : 36,
width : 36,
listeners: {
el: {
click: function() {
console.log('click event capture on image')
}
}
}