Hi,
I have the following code
<script>
function addTab(){
address = 'new.html';
if ($('#docTabs').tabs('exists','New')){
$('#docTabs').tabs('getTab','New').panel('refresh',address);
$('#docTabs').tabs('select','New');
} else {
$('#docTabs').tabs('add',{title:'New',href:address,closable:true});
}
}
</script>
<div id="docTabs" class="easyui-tabs" style="width:700px;height:250px">
<div title="TEST" style="padding:10px">
<input type="button" onclick="addTab()" value="TEST">
</div>
</div>
new.html (short copy of basic.html from treegrid demo)<table title="Folder Browser" class="easyui-treegrid"
data-options="
url: 'treegrid_data1.json',
method: 'get',
rownumbers: true,
idField: 'id',
treeField: 'name'
">
<thead>
<tr>
<th data-options="field:'name'" width="220">Name</th>
<th data-options="field:'size'" width="100" align="right">Size</th>
<th data-options="field:'date'" width="150">Modified Date</th>
</tr>
</thead>
</table>
1) When I press button I get
syntax error ...... treegrid_data.json:1:1
This problem is visible in Firefox with basic.html from treegrid demo folder.
2) When I press button again (the New tab is already oppened) I get this:
TypeError: $.data(...) is undefined .......jquery.easyui.min.js:10107:7