EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Deiva on May 14, 2012, 07:02:39 AM



Title: Report one issue about href and cache property in dialog
Post by: Deiva on May 14, 2012, 07:02:39 AM
using 1.2.6 version and chrome (17.0.963.56m) browser.
There are two issues happen to me, when I use dialog function.
1. when it sets cache is false, the data can not reload remote data while open it again.
2. when it initiates, it seems to get remote data twice. (I can see the accessed logs from chrome)

Dialog Html
Code:
 <div id="dlg" class="easyui-dialog" closed="true" buttons="#dlg-buttons"></div>
<div id="dlg-buttons">
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveUser()">Save</a>
</div>

JavaScript
Code:
    function add() {
        $('#dlg').dialog({
            title: 'New Title',
            width: 600,
            height: 300,
            cache: false,
            closed: false,
            href: 'ClientSiteAct.aspx'
        });
    }


Title: Re: Report one issue about href and cache property in dialog
Post by: Deiva on May 17, 2012, 08:07:23 AM
Could someone help me out, how to make it reads remote data with property Href when it open?
It is very important  now.
Please!!


Title: Re: Report one issue about href and cache property in dialog
Post by: stworthy on May 17, 2012, 06:30:07 PM
See the code below:
<div id="dlg" class="easyui-dialog" closed="true" buttons="#dlg-buttons"></div>
You have create the dialog, but sometime later you call:
$('#dlg').dialog({...});
You create dialog again. That is why data is loaded again.

For the cache issue, download the fixed dialog plugin from
http://www.jeasyui.com/easyui/plugins/jquery.parser.js
http://www.jeasyui.com/easyui/plugins/jquery.dialog.js

you can also call 'refresh' method while open the dialog:
$('#dlg').dialog('open').dialog('refresh');


Title: Re: Report one issue about href and cache property in dialog
Post by: Deiva on May 18, 2012, 02:47:01 AM
Thank you very much!
It is fixed from your point.