EasyUI Forum
June 26, 2024, 12:50:23 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: When loading other pages used to generate dialogs, the layout is messed up  (Read 4261 times)
officecode
Jr. Member
**
Posts: 69


View Profile Email
« on: March 07, 2019, 03:27:54 AM »

Hello, everyone.
I have two page files:
"test1.html" is used to generate a dialog with the following code:

Code:

<body>
<div id="cs"></div>
<script>
$(function(){
$('#cs').dialog({
title:'my title',
width:200,
height:200,
content:'test'
})
})
</script>
</body>


"test2.html" is used to generate the layout. When clicking the button, I want to call the dialog in "test1.html". code show as below:

Code:

<body class="easyui-layout">
<div region="north" style="height: 60px">
<div id="bt" class="easyui-linkbutton" onclick="$('#dlg').load('test1.html')">button</div>
</div>
<div region="west" width=180 title="menu"></div>
<div id="dlg"></div>
</body>


The problem is that when the button is clicked, although the dialog box is displayed, the layout of the layout is messed up.
Please help, thank you very much!
Logged
jarry
Administrator
Hero Member
*****
Posts: 2267


View Profile Email
« Reply #1 on: March 07, 2019, 07:24:06 AM »

The layout must have a 'center' region panel. Please put it on your layout component.
Logged
officecode
Jr. Member
**
Posts: 69


View Profile Email
« Reply #2 on: March 07, 2019, 08:35:22 AM »

After adding "center", the same problem still occurs:
Code:
<body class="easyui-layout">
<div region="north" style="height: 60px">
<div id="bt" class="easyui-linkbutton" onclick="$('#dlg').load('test1.html')">button</div>
</div>
<div region="west" width=180 title="menu"></div>
<div region="center" title="content"></div>
<div id="dlg"></div>
</body>


Logged
jarry
Administrator
Hero Member
*****
Posts: 2267


View Profile Email
« Reply #3 on: March 07, 2019, 07:05:52 PM »

Please look at this example https://www.jeasyui.com/demo/test/test5.html
Logged
officecode
Jr. Member
**
Posts: 69


View Profile Email
« Reply #4 on: March 07, 2019, 10:31:26 PM »

Understand that it is only necessary to load the body part of the page.
Thanks.
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!