EasyUI Forum
September 13, 2025, 04:32:13 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: update div in the region center with refresh all page  (Read 11173 times)
pedroc
Newbie
*
Posts: 17


View Profile
« 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
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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');
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!