日期:2014-05-16  浏览次数:20332 次

ext tabpanel布局 每次点击tab页都要他刷新
本帖最后由 showbo 于 2013-10-21 14:12:09 编辑

var stock_allot_info_panel = new Ext.Panel(
            {
                id: 'stock_allot_info_panel',
                title: 'abc',
                closable: false,
                layout: 'fit',
                width: 500,
                height: 200,
                script: true,
                border: false,
                listeners: { activate: function (tab) { document.getElementById('stock_allot_info_panel_iframe').src='${ctx}expand/stock_allot_info.jsp?time=' + new Date().getTime() } },
                autoScroll: true,
                html: "<iframe  id='stock_allot_info_panel_iframe' style='width:100%;height:100%' frameborder='no' src='ajax1.htm?time=" + new Date().getTime() + "'></iframe>"
            })

上面的是一个tab页如何让他每次点击都去刷新iframe中的内容呢,请大虾指教
40

------解决方案--------------------
给tab添加activate事件,在activate事件中添加刷新代码
document.getElementById('stock_allot_info_panel_iframe').src='${ctx}expand/stock_allot_info.jsp?time=" + new Date().getTime()