开发者

Calling javascript function defined on the child window from parent window EXTJS

开发者 https://www.devze.com 2023-03-16 13:07 出处:网络
I have a EXTJS modal window. I would like to call a function defined on the child window from the parent window every time child window gets displayed. Is it possible to call child window function fro

I have a EXTJS modal window. I would like to call a function defined on the child window from the parent window every time child window gets displayed. Is it possible to call child window function from parent window in EXTJS modal window. Thanks.

Ext.onReady(function(){
    if (! mywindow){
        // create the window on the first cl开发者_开发百科ick and reuse on subsequent clicks
        mywindow = new Ext.Window({
            title: 'My Modal Winow',
            closable:true,
            closeAction:'hide',
            width:600,
            height:350,
            border:false,
            maximizable: true,
            plain:true,
            layout: 'border',
            id : 'mywindowid',
            html  : '< div id="userframe"><iframe style="overflow:auto;width:100% height:100%;" frameborder="0" id="mrgraphiframe" src="' + customurl + '"></iframe></div >'

 ,listeners : {
         show: myfunction(){}
              }// end of listner
        });
    }        
    mywindow.show(this);
});


If you want a function to execute whenever the window is shown, just attach an event listener to it..

listeners : {
    show: functionToCall
}
0

精彩评论

暂无评论...
验证码 换一张
取 消