EasyUI Forum
April 29, 2024, 03:28:49 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to access element in page opened by JEASYUI-TABS from parent?  (Read 5250 times)
Jonny
Newbie
*
Posts: 38


View Profile Email
« on: February 13, 2016, 10:11:24 PM »

Dear Sir/Madam,

       Is there possible to access combogrid or any element in page opened by jeasyui-tabs from parent ?

Usually I open new page like below:

var content = '<iframe scrolling="auto" frameborder="0"  src="CHILD.HTML" style="width:100%;height:100%;  overflow:hidden"> </iframe>';
$('#tt').tabs('add',{ title:"CHILDMENU",
                           content: content,
                           closable:true,
                           bodyCls:'noscroll'
});

Then for some reason, I want to reload combogrid inside CHILD.HTML

I failed using this way:
var dechild = $('#tt').tabs('getTab', 'CHILDMENU');
if (dechild!= null) {
        var cooo = dechild.document.getElementById("OOO");
        cooo.combogrid('reload');
       }
}   


Please help me solve the problem...
Thank you...

Regards,
JONNY
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: February 14, 2016, 02:07:08 AM »

You can define a function 'reloadCombogrid' in the 'CHILD.HTML' page. Find the <iframe> and get the 'contentWindow', call any functions defined in it.
Code:
var dechild = $('#tt').tabs('getTab', 'CHILDMENU');
if (dechild != null){
var cw = dechild.find('iframe')[0].contentWindow;
cw.reloadCombogrid();
}
Logged
Jonny
Newbie
*
Posts: 38


View Profile Email
« Reply #2 on: February 14, 2016, 04:19:52 AM »

Hello Sir,

Thank you very much for the solution.

It works perfectly...

Now I can easily call any function located on child page....  Smiley Cheesy


Regards,
Jonny
Logged
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!