EasyUI Forum
May 02, 2024, 02:54:25 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Aabout one iframe refresh other iframe datagrid !  (Read 9670 times)
zh_CN
Newbie
*
Posts: 32



View Profile Email
« on: April 25, 2014, 12:30:07 AM »

Hi all.

have 2 tab:
a tab --- title: "内容"
Code:
$(function(){
    var context = this;
    var $grid = $('#article_grid');
    var viewDialog;
    var selectedMenuId, selectedMenuText;


        $grid.datagrid({
        title: '文章列表',
...
});

b tab code below:
$('#art_submit').click(function(){


            var tab = parent.$('#tabs').tabs('getTab', '内容');  // get selected panel
            parent.$('#tabs').tabs('select', '内容');

            alert(tab.find('iframe').get(0).contentWindow.document.getElementById('btn-group').innerHTML);
            //alert: 文章 编辑...

            alert(tab.find('iframe').get(0).contentWindow.document.getElementById('article_grid'));
            // alert: [object HTMLTableElement]

            tab.find('iframe').get(0).contentWindow.document.getElementById('article_grid').datagrid('reload');
            // no alert and tips:TypeError: tab.find(...).get(...).contentWindow.document.getElementById(...).datagrid is not a function
}

« Last Edit: April 25, 2014, 05:11:14 AM by zh_CN » Logged

From the great China
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!