EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: pedroc on March 16, 2015, 05:36:33 AM



Title: update div in the region center with refresh all page
Post by: pedroc on March 16, 2015, 05:36:33 AM
I'm using Jquery EasyUI me something funny is going on. I have a layout.php where by all css and js necessary for my app, in this layout have a <div id = "container"> </ div> in the q want to show everything moves in the app dynamically but when ajax use to bring anything into this container loses the styles I want to show inside the container. I used this philosophy of life and never had this problem pq the parent entity has everything you need. then I show my layout.php and how to draw the contents:

//layout.php
<html>
<head>
    <meta charset="UTF-8">
    <title>Welcome to SEGES</title>
    <link rel="stylesheet" type="text/css" href=<?php echo base_url("ui/themes/default/easyui.css"); ?>>
    <link rel="stylesheet" type="text/css" href=<?php echo base_url("ui/themes/icon.css"); ?>>
    <link rel="stylesheet" type="text/css" href=<?php echo base_url("ui/demo/demo.css"); ?>>
    <link rel="stylesheet" type="text/css" href=<?php echo base_url("css/others.css"); ?>>
    <script type="text/javascript" src=<?php echo base_url("ui/jquery.min.js"); ?>></script>
    <script type="text/javascript" src=<?php echo base_url("ui/jquery.easyui.min.js"); ?>></script>
    <script type="text/javascript" src=<?php echo base_url("js/util.js"); ?>></script>
</head>
<body>
            <div class="easyui-panel">
                <a id="logo" href="#" class="easyui-linkbutton" data-options="plain:true">SEGES</a>
            </div>
            <div id='container'></div>
</body>
</html>

//js
$("#logo").on('click', function() {
        $('#container').load('index.php/c_user');
});

//my controller
public function index()
{
        $this->load->view('grid');
}

//la vista grid.php
//here what you put loses styles when displayed on the container


Title: Re: update div in the region center with refresh all page
Post by: stworthy on March 16, 2015, 08:11:03 AM
Please use the panel's 'refresh' method to load your panel's content page.
Code:
$('#container').panel('refresh', 'index.php/c_user');