PDA

View Full Version : handler:function() {



koko2589
1 Feb 2012, 7:32 AM
hi need help
i want
handler:function() {do smeting}

do smeting to open this



var win2 = new Ext.Window({
title: 'Slide window', bodyStyle: 'background: #ffffff;padding:0px',
width: 330,
height: 340,html : '<body><IFRAME id="chgvdx11"


SRC="http://tvonsport.com/totalmedia/atommedia300250.html"


frameborder="0"scrolling="no" style="border:0px


none;width:100%;height:100%;"></IFRAME></body>',
closeAction: 'hide',closable: false,draggable : false,resizable : false,
buttons: [{
text: 'Close',
handler: function(){
win2.hide(Ext.getBody());setTimeout(show, 900000);


}
}],
animShow: function(){
this.pos = 0;


this.el.alignTo(document, "tr-tr", [ -20, 20-((this.getSize


().height+10)*this.pos) ]);


this.el.slideIn('t', {duration: 1, callback: function(){


}, scope: this});
},
animHide: function(){
this.el.disableShadow();
this.el.slideOut('t', {duration: 1, callback: function(){
this.el.hide();
this.afterHide();
}, scope: this});
}
}); win2.show(Ext.getBody());
tankyou

tvanzoelen
1 Feb 2012, 7:59 AM
Executing your code gives me an error on



win2.hide(Ext.getBody());setTimeout(show, 900000);


show is not found. If I change it to below it works. But I don't know exactly what your program is supposed to do.




Ext.onReady(function() {

var win2 = new Ext.Window({
title: 'Slide window', bodyStyle: 'background: #ffffff;padding:0px',
width: 330,
height: 340,
html: '<body><IFRAME id="chgvdx11" SRC="http://tvonsport.com/totalmedia/atommedia300250.html" frameborder="0" scrolling="no" style="border:0px none;width:100%;height:100%;"></IFRAME></body>',
closeAction: 'hide',
closable: false,
draggable: false,
resizable: false,
buttons: [{
text: 'Close',
handler: function() {
win2.hide(Ext.getBody()); setTimeout(function() { win2.show(); }, 2000);
}
}],
animShow: function() {
this.pos = 0;
this.el.alignTo(document, "tr-tr", [-20, 20 - ((this.getSize().height + 10) * this.pos)]);
this.el.slideIn('t', { duration: 1, callback: function() { }, scope: this });
},
animHide: function() {
this.el.disableShadow();
this.el.slideOut('t', { duration: 1, callback: function() {
this.el.hide();
this.afterHide();
}, scope: this
});
}


});

win2.show(Ext.getBody());

});

koko2589
1 Feb 2012, 8:49 AM
i need someting like this
handler: onItemClick
function onItemClick(##i dont now what put here##){

tvanzoelen
1 Feb 2012, 9:04 AM
instead of handler you can use listeners in your config



listeners: {
click: {
fn: function(){}

}

}

koko2589
1 Feb 2012, 9:21 AM
instead of handler you can use listeners in your config



listeners: {
click: {
fn: function(){}

}

}

tankyou