EasyUI Forum
April 23, 2024, 09:42:42 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / Bug Report / Datagrid in hidden iFrame can't display rows in IE browser on: January 07, 2014, 10:57:50 PM
This bug only happens in IE browser.

This DIV that includes one iFrame will show using $("#announcement").show. The datagrid resides in the iFrame page which will be show.

After the main page is loaded, I click the announcement tab to show the iFrame div, but only the title and the pagination bar are shown, no records display. From pagination bar, we can got that all the records is retrieved.

I have to click the next page or reload button the got all the record rows.

I spent two days to debug this problem, but found nothing. I checked the HTML rendered after the main page loaded, $(".datagrid-view2 .datagrid-body") is empty. When I click the tab to show the iframe, it have contents, but I can't got when it is populated.

I also found that, in the "jquery-easyui-1.3.4/jquery.easyui.min.js" files, the line 8366 is last called.

I post this problem also in General Discussion, you can check the code from

http://www.jeasyui.com/forum/index.php?topic=2720.0

Please refer to below screenshots.



2  General Category / General Discussion / EasyUI datagrid in iFrame can't display records in first click loading or IE on: January 07, 2014, 08:46:05 PM
I have one iFrame which include the datagrid in my JSP page, the iFrame will show only by clicking the tab.

The problem is that when I click the Announcement Tab to show the iFrame, the databrid only shows the pagination bar, no records displayed.

When I click the refresh or next page button, the data will display.

I debuged and found that, the datagrid was rendered.

The main page was like below:
Code:
<%@ page contentType="text/html; charset=utf-8"%>
<head>
    <title>首页</title>
    <script type="text/javascript" src="<%=request.getContextPath()%>/StaticResource/jslib/jquery-easyui-1.3.4/jquery-1.8.0.min.js"></script>
      <style type="text/css">
        .div_style{
            width:770px; height:740px;border: 0px solid black;
         }

        .tabNav_sq{
            width:600px; height:42px; margin:0; padding:0;}
        .tabNav_sq li{float:left; height:42px;margin-right:5px;}

         .tabNav_sq li a{display:block;float:left; width:120px;height:42px; line-height:42px; position:relative; z-index:2;text-align:center;
                  color:#333;cursor:pointer; border:1px solid #fead21; border-bottom:0; font-weight:bolder; font-size:14px;
                  border-radius-topleft:5px;
                  border-radius-topright:5px;
                  -webkit-border-radius-topleft:5px;
                  -webkit-border-radius-topright:5px;
                  -moz-border-radius-topleft:5px;
                  -moz-border-radius-topright:5px;
                  background: #fff;
                  background: -moz-linear-gradient(top, #feda98 0%, #fff4e0 100%);/* FF3.6 */
                  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#feda98), color-stop(100%,#fff4e0));
                  background: -webkit-linear-gradient(top, #feda98 0%,#fff4e0 100%); /* Chrome 10+, Saf5.1+ */
                  background: -o-linear-gradient(top, #feda98 0%,#fff4e0 100%); /* Opera 11.10+ */
                  background: -ms-linear-gradient(top, feda98 0%,#fff4e0 100%);/* IE10 */
                  background: linear-gradient(top, #feda98 0%,#fff4e0 100%);
                  behavior:url(../js/ie-css3.htc);
        }
    </style>
    <script>
        function show(){
            $("#ann").show();
        }

    </script>
</head>
<body>
    <div id="wrapper">
       <div class="tpaicWebAlipay fl w800">
            <div class="tab_containerfix cb mt15">
                 <div class="tabNavWrap">
                    <ul class="tabNav_sq">
                         <li><a href="javascript:void(0);" ><span>Line data</span></a></li>
                         <li><a href="javascript:void(0);" onclick="show();"><span>Announcement</span></a></li>
                    </ul>
                </div>
                 <div style="display:none;">
                     <div>
                     </div>
                </div>
                 <div  id="ann" class="b-gray lh200 tabCont" style="display:none;">
                     <div class="div_style">
                        <iframe id="announcementForm" name="announcementForm"  width="100%" height="100%"  frameborder="0" scrolling="no"
                                src="<%=request.getContextPath()%>/system/announcement/home_list.do"></iframe>
                     </div>  
                </div>
           </div>
        </div>
    </div>
</body>
</html>


the /system/announcement/home_list.do request will direct to the page like below:

Code:
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>通知公告</title>
<link rel="stylesheet" type="text/css"
    href="<%=request.getContextPath()%>/StaticResource/jslib/jquery-easyui-1.3.4/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
    href="<%=request.getContextPath()%>/StaticResource/jslib/jquery-easyui-1.3.4/themes/icon.css">
<script type="text/javascript"
    src="<%=request.getContextPath()%>/StaticResource/jslib/jquery-easyui-1.3.4/jquery-1.8.0.min.js"></script>
<script type="text/javascript"
    src="<%=request.getContextPath()%>/StaticResource/jslib/jquery-easyui-1.3.4/jquery.easyui.min.js"></script>
<script type="text/javascript"
    src="<%=request.getContextPath()%>/StaticResource/jslib/jquery-easyui-1.3.4/locale/easyui-lang-zh_CN.js"
    charset="UTF-8"></script>
    <script>
        $(function(){
            $("#dg").datagrid({
                width:500,
                height:400,
                url:'${pageContext.request.contextPath}/system/announcement/list_json.do?',
                singleSelect:true,
                pageSize:10,
                pagination:true,
                pageList : [ 10, 20, 30, 40, 50],  
                loadMsg: 'Loading...,wait!',
                columns:[[
                            {field:'title',title:'title',width:150,align:'center'},
                            {field:'beginDate',title:'beginDate',width:150,align:'center'},
                            {field:'endDate',title:'endDate',width:150,align:'center'},
                          ]],
                onLoadSuccess:function(e) {
                    var a = 'aa';
                }
            });
            $('#dg').datagrid('getSelected');
            var b = "ccc";
        });
    </script>
</head>
<body style="width:100%;heighgt:300px;overflow:auto;">
    <div>
        <div style="position:relative; overflow:auto;">
            <table id="dg" title="Announcement Show">
            </table>
        </div>
    </div>
</body>
</html>

All worked perfectly good for chrome, this problem only happened in IE. Can anyone tell me why and the workaround for this.

The result is like below screenshots.

I also found that, when the main page was first loaded, there is no element for $(".datagrid-view2 .datagrid-body"). After I click the "announcement tab", the element for $(".datagrid-view2 .datagrid-body") exists. I wonder why it not display when it exists. And in chrome browser, this element exists when the main page first loaded.

I don't know if it is a bug for EasyUI to handle browser compatibility.

 
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!