EasyUI Forum
April 20, 2024, 04:22:53 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: Window with two tabs [SOLVED]  (Read 3518 times)
chriseana
Newbie
*
Posts: 2


View Profile Email
« on: November 06, 2017, 06:10:24 AM »

I have a Treeview with a onclick event that shows a window that loads an specific HTML page:
Code:
  /* On Click Function */
$('#tt').tree({
onClick: function(node){

if (node.url == "" || node.url == null) {
} else {
/* Open a Window to show data */
$('#win').window({
          width:880,
          height:500,
          modal:true
         });
/* load window content from disk */
        $('#win').window('refresh', node.url);

/* Define window properties */
$('#win').window({
cls:'c7',
title: 'Dados',
border:'thin',
collapsible: false,
minimizable: false,
maximizable: true,
closable: true
});

/* alert(node.url);  // alert node text property when clicked */
  }
}
});


Now, I need to open this same window but with two TABs, each loading a specific HTML page.

How can I do this using Javascript?
« Last Edit: November 07, 2017, 09:58:52 AM by chriseana » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 07, 2017, 02:26:09 AM »

In your 'onClick' event, open the window component and load its content.
Code:
onClick: function(node){
var url = node.url;
$('#win').window('open').window('refresh', url)
}

The window component looks like this:
Code:
<div id="win" class="easyui-window" closed="true" style="width:600px;height:300px">
</div>

And the content page looks like this:
Code:
<div class="easyui-tabs" fit="true">
<div title="Tab1"></div>
<div title="Tab2"></div>
</div>
Logged
chriseana
Newbie
*
Posts: 2


View Profile Email
« Reply #2 on: November 07, 2017, 10:00:06 AM »

Thank you,
It's working now.
It's so easy, but I was stuck in another paradigm.

Best regards
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!