PDA

View Full Version : TreePanel dataUrl with http:// issue



meikuei
12 Nov 2009, 4:50 AM
Hi,

i'm trying to build a TreePanel which get data's from an external server, but i have trouble when I use a non relative Url in 'dataUrl' attribute.

exemple : dataUrl:'/getData.php' works but dataUrl:'http://192.168.0.13/getData.php' don't.

there is my treePanel code :



var dimensionsTree = new Ext.tree.TreePanel({
title : 'Dimensions Availables',
iconCls : 'repo-icon-cls',
rootVisible : true,
region : 'west',
flex : 1,
margins : '5 0 5 5',
useArrows : true,
autoScroll : true,
animate : true,
enableDD : true,
containerScroll : true,
frame : true,
loader : new Ext.tree.TreeLoader({
dataUrl:'http://192.168.3.32:8080/ViewerServlet'
}),
root : {
nodeType : 'async',
text : 'Dimensions',
draggable : false,
id : 'dimensionsRoot'
}
});

jay@moduscreate.com
12 Nov 2009, 4:56 AM
it's not a problem with the tree, but with XHR objects - they cannot access a different URL/Domain.

meikuei
12 Nov 2009, 5:00 AM
Thanks for your rapid reply :)