PDA

View Full Version : File specified in dataUrl: is not being executed



coplaxi
27 Jul 2009, 11:24 AM
(Using asp.net with extjs)
I am using an Extjs treeivew implementation. The code works great on my local machine, but when deployed to a server test environment the code is not working. I was able to determine that when this application runs on the server, that the "TreeLoader.aspx" code is never executed even though it clearly is on the server.
This code "TreeLoader.aspx" is specified below in my dataUrl.
So why would this code work fine on my local machine localhost but not on the server? Can someone help me out?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default2.aspx.cs" Inherits="Drag_Drop.default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Organization Chart</title>
<link href="resources/css/OrgTree.css" rel="stylesheet" type="text/css" />
<script src="adapter/ext/ext-base.js" type="text/javascript"></script>
<script src="ext-all-debug.js" type="text/javascript"></script>
</head>
<body>
<script language="javascript" type="text/javascript">
Ext.onReady(function() {
var Tree = Ext.tree;
tree = new Tree.TreePanel({
el: 'divEmployees',
useArrows: true,
autoScroll: true,
animate: true,
enableDD: true,
containerScroll: true,
dataUrl: 'TreeLoader.aspx',
root: {
nodeType: 'async',
text: 'Olive Division',
visible: false,
id: 'source'
}
});
// render the tree and expand the parent node
tree.render();
tree.getRootNode().expand();
tree.on('beforemovenode', function(tree, node,
oldParent, newParent, index) {
Ext.Ajax.request({
url: 'updateorg.aspx',
method: 'post',
params: {
nodeid: node.id,
newparentid: newParent.id,
oldparentid: oldParent.id,
dropindex: index
}
});
});

});

</script>
<div id="divEmployees" style="width: 450px; height: 600px">
</div>
</body>
</html>

tryanDLS
28 Jul 2009, 7:26 AM
http://extjs.com/learn/Ext_Forum_Help#How_to_post_code_properly

Use Firebug. What does the server response look like?

coplaxi
28 Jul 2009, 12:05 PM
Basically the TreeLoader code appears to not being called when deployed to the server. What response were you asking about specifically?