PDA

View Full Version : IFrame and Collapsed Panel : Weird things Happening : Event Getting Triggered again



pulkitagarwal
5 Jan 2011, 12:28 PM
I had a case where a Panel had a link clicking which creates a event (download a file) occuring in IFrame.
Now that event got triggered again and again whenever the panel was collapsed.

Solution instead of doing togglecollapse I used Hide :
I.e.

afterrender : function(boxer){

boxer.getEl().on('click',function(){

if(!innerPanel.hidden){

innerPanel.hide();

this.addClass('bootstrapper-toolbar-button-collapsed');

}

else{

innerPanel.show();

this.removeClass('bootstrapper-toolbar-button-collapsed');

}

});



This is just a hack if anybody can point out what the error was then great .

pulkitagarwal
5 Jan 2011, 12:31 PM
[SOLVED] I had that event in afterrender function : of course collapse and expand will trigger the afterrender again .
But I am keeping the hide thing only .