hai all..
i had build treePanel based on database. so the one of some callback from server is url.
this url is linked to another extjs file (formPanel). the problem is i couldn't load that url's content to myPanel. somebody can help me...?
here the scripts:
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>User Generated Content Module</title>
<link rel="stylesheet" type="text/css" href="../ext-2.0/resources/css/ext-all.css" />
<!-- GC -->
<!-- LIBS -->
<script type="text/javascript" src="../ext-2.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext-2.0/ext-all-debug.js"></script>
<!-- ENDLIBS -->
<script type="text/javascript" src="../ext-2.0/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="../ext-2.0/examples/examples.css" />
<!-- script language="javascript" src="hello.js"></script -->
</head>
<body>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = '../ext-2.0/resources/images/default/s.gif';
Ext.onReady(function(){
Ext.QuickTips.init();
var Tree = Ext.tree;
this.tree_1 = new Tree.TreePanel({
title: 'news',
rootVisible: true,
autoScroll: true,
containerScroll: true,
margin: '5 0 0 0',
loader: new Tree.TreeLoader({
dataUrl: 'http://localhost/project/getTree.php?type=News'
}),
listeners: {
click: {fn: nodeClick, scope: this }
}
});
root = new Tree.AsyncTreeNode({
text: 'News Management',
id: 'root'
});
this.tree_1.setRootNode(root);
//root.expand();
this.westPanel = new Ext.Panel({
title: 'News Management',
collapsible: true,
frame: true,
plain: true,
width: 350,
region: 'west',
layout: 'accordion',
layoutConfig: { animate: true },
items: [this.tree_1]
});
this.centerPanel = new Ext.Panel({
id:'centerPan',
title: 'Detail',
frame: true,
plain: true,
region: 'center',
height: 300,
//autoLoad: { url: 'node.attributes.url'}
//html: 'this is my first Buddy'
});
this.panel = new Ext.Panel({
title: 'Citizen Journalism',
layout: 'border',
frame: true,
plain: true,
height: 350,
bodyStyle: 'background: white;',
items:[this.westPanel, this.centerPanel],
renderTo: 'bigPanel'
});
function nodeClick(node, e){
if(node.attributes.url)
{
this.centerPanel.load(node.attributes.url);
}
}
});
</script>
<div id="bigPanel"></div>
</body>
</html>
thanks for all attention...
regards