EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
January 13, 2025, 02:06:18 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
General Discussion
>
How to refresh layout in window
Pages: [
1
]
« previous
next »
Print
Author
Topic: How to refresh layout in window (Read 24335 times)
chiefer
Newbie
Posts: 10
How to refresh layout in window
«
on:
February 24, 2014, 01:44:22 AM »
I create a window includes 2 layout, north and center.When I open the window 'win_address_shipping', the layout of 'north' can get remote data.I still have a button in the window and bind 'click' event to refresh the 'north' layout, not the whole window 'win_address_shipping'.
Below is the window html code:
<div id="win_address_shipping" class="easyui-window" title="Address & Shipping Management" style="width:600px;height:430px" data-options="collapsible:false,maximizable:false,minimizable:false,closed:true" >
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',split:true" style="height:230px;overflow:auto;" href="ajax_user_address.php"></div>
<div data-options="region:'center'" style="overflow:auto;"><div id="pop_address_box"></div></div>
</div>
</div>
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: How to refresh layout in window
«
Reply #1 on:
February 24, 2014, 08:21:20 AM »
To refresh a region panel's content, get the region panel and then call 'refresh' method on it.
Code:
var p = $(...).layout('panel','north'); // get the north panel
p.panel('refresh'); // refresh the panel content
Logged
chiefer
Newbie
Posts: 10
Re: How to refresh layout in window
«
Reply #2 on:
February 24, 2014, 07:46:20 PM »
I also wirte like this, but it reported the following error
--------------------------------------------------------------------------------------
Uncaught TypeError: Cannot read property 'panels' of undefined jquery.easyui.min.js:4372
$.fn.layout.methods.panel jquery.easyui.min.js:4372
$.fn.layout jquery.easyui.min.js:4350
(anonymous function) wholesale.js:1062
p.event.dispatch jquery-1.8.0.min.js:2
g.handle.h
--------------------------------------------------------------------------------------
Logged
chiefer
Newbie
Posts: 10
Re: How to refresh layout in window
«
Reply #3 on:
February 24, 2014, 07:57:30 PM »
I used jQuery EasyUI 1.3.2
Logged
chiefer
Newbie
Posts: 10
Re: How to refresh layout in window
«
Reply #4 on:
February 25, 2014, 10:40:55 PM »
I used another way to solve this problem. I set ID to the north, the ID is 'pop_address_list_box'
<div id="win_address_shipping" class="easyui-window" title="Address & Shipping Management" style="width:600px;height:430px" data-options="collapsible:false,maximizable:false,minimizable:false,closed:true" >
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',split:true" style="height:230px;overflow:auto;" href="ajax_user_address.php"
id="pop_address_list_box"
></div>
<div data-options="region:'center'" style="overflow:auto;"><div id="pop_address_box"></div></div>
</div>
</div>
js code is
$('#pop_address_list_box').panel({
href:'ajax_user_address.php?action=pop_address_shipping'
})
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...