EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: debarcar on July 01, 2015, 05:13:57 AM



Title: Can't build window html fragment loaded from server
Post by: debarcar on July 01, 2015, 05:13:57 AM
Hi All,

$.getScript("modules/commonEdit.js", function() {
      });

commonEdit.js:
$('body').append("<div id=\"win_commongrid\"></div>");
$("#win_commongrid").window({...

It is ok when the window build from js.

But when I use this:
$('body').append("<div id=\"win_xxxx\"></div>");
$("#win_xxxx").load("modules/commonCreate.html");

commonCreate.html:
<div id="w" class="easyui-window" title="Basic Window"
   data-options="iconCls:'icon-save'"
   style="width: 500px; height: 200px; padding: 10px;">The window
   content.</div>

In firebug, the html fragment is loaded and the div is added. But the window is not built.

Any suggestion and thanks!

Dixon




Title: Re: Can't build window html fragment loaded from server
Post by: jarry on July 01, 2015, 07:06:25 AM
Please use the panel's refresh method to load content page.
http://www.jeasyui.com/demo/main/index.php?plugin=Panel&theme=default&dir=ltr&pitem=Load%20Content


Title: Re: Can't build window html fragment loaded from server
Post by: debarcar on July 01, 2015, 07:10:18 PM
It works! Thank you jarry!!

Regards!