dbassett74
30 Sep 2009, 8:35 AM
Rather than littering my code with ajax requests, I'm trying to consolidate into a single location, and give each request its own function name. But, I'm having difficulty in getting events on the connection object. What am I doing wrong? In the below code, the 'success' event never gets fired, even though in the actual ajax request inside of getApplicationData() returns success:
var btn = new Ext.Button({
text: "Get Application Data",
handler: function() {
var request = getApplicationData("user1"));
request.on('success', function() {
console.log("success...");
}, this);
},
renderTo: "divBody"
});
var btn = new Ext.Button({
text: "Get Application Data",
handler: function() {
var request = getApplicationData("user1"));
request.on('success', function() {
console.log("success...");
}, this);
},
renderTo: "divBody"
});