Title: easyui load
Post by: qilicn on December 25, 2012, 06:12:34 PM
for some reason,I can't use iframe in my app,so I want use <div> and juqery load function. with easyui , i find a problem :in the loaded html file only datagrid can work well,other work incorrectly(can not parse etc...) and use the panel refresh function get the same result
Title: Re: easyui load
Post by: stworthy on December 25, 2012, 06:52:20 PM
Providing a simple example to demonstrate this issue may be more appropriate.
Title: Re: easyui load
Post by: qilicn on December 25, 2012, 07:57:33 PM
use easyui demo to explain the issue the main page : (panel.html) <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Panel - jQuery EasyUI Demo</title> <link rel="stylesheet" type="text/css" href="../js/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="../js/themes/icon.css"> <link rel="stylesheet" type="text/css" href="demo.css"> <script type="text/javascript" src="../js/jquery-1.8.3.js"></script> <script type="text/javascript" src="../js/jquery.easyui.all.js"></script> <script> function open1(){ $('#p').panel('open'); } function close1(){ $('#p').panel('close'); } function load1(){ $('#p').panel('refresh','layout.html'); } </script> </head> <body> <h2>Panel</h2> <div class="demo-info"> <div class="demo-tip icon-tip"></div> <div>Click the right top buttons to perform actions with panel.</div> </div> <div style="margin:10px 0;"> <a href="#" class="easyui-linkbutton" onclick="open1()">Open</a> <a href="#" class="easyui-linkbutton" onclick="close1()">Close</a> <a href="#" class="easyui-linkbutton" onclick="load1()">Load</a> </div> <div style="height:300px;background:#fafafa;padding:5px;"> <div id="p" class="easyui-panel" style="padding:10px;" data-options="title:'My Panel',iconCls:'icon-save', collapsible:true,minimizable:true,maximizable:true,closable:true"> <p>panel</p> <p>panel</p> <p>panel</p> <p>panel</p> <p>panel</p> <p>panel</p> <p>panel</p> <p>panel</p> <p>panel</p> <p>panel</p> <p>panel</p> <p>panel</p> </div> </div> </body> </html>
the load page : use layout.html <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Border Layout - jQuery EasyUI Demo</title> </head> <body class="easyui-layout"> <div data-options="region:'north',border:false" style="height:60px;background:#B3DFDA;padding:10px">north region</div> <div data-options="region:'west',split:true,title:'West'" style="width:150px;padding:10px;">west content</div> <div data-options="region:'east',split:true,collapsed:true,title:'East'" style="width:100px;padding:10px;">east region</div> <div data-options="region:'south',border:false" style="height:50px;background:#A9FACD;padding:10px;">south region</div> <div data-options="region:'center',title:'Main Title'"></div> </body> </html>
Use IE8,9,ff17 get the same result
Title: Re: easyui load
Post by: stworthy on December 25, 2012, 08:36:13 PM
Try use the 'layout.html' below instead. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Border Layout - jQuery EasyUI Demo</title> </head> <body> <div class="easyui-layout" style="width:600px;height:400px"> <div data-options="region:'north',border:false" style="height:60px;background:#B3DFDA;padding:10px">north region</div> <div data-options="region:'west',split:true,title:'West'" style="width:150px;padding:10px;">west content</div> <div data-options="region:'east',split:true,collapsed:true,title:'East'" style="width:100px;padding:10px;">east region</div> <div data-options="region:'south',border:false" style="height:50px;background:#A9FACD;padding:10px;">south region</div> <div data-options="region:'center',title:'Main Title'"></div> </div> </body> </html>
Title: Re: easyui load
Post by: qilicn on December 26, 2012, 02:12:03 AM
it works ,thank you
|