PDA

View Full Version : ext.data.connection



extjsuser2010
22 Feb 2010, 1:39 AM
hi,
well i am facing a prob with this. i am sending data to the backend jsp and also recieving a response but neither callback nor success functions are getting executed. why might that be happening? thanks for ur help.

fay
22 Feb 2010, 3:16 AM
It's impossible to tell what's going amiss without seeing any of your code. http://www.extjs.com/learn/Ext_Forum_Help#Posting_a_working_showcase

extjsuser2010
22 Feb 2010, 8:26 PM
var conn=Ext.data.Connection();

conn.request({

url:'backend4.jsp',
method:'POST',
params:{ txt:Ext.get(textbox1).dom.value},

success:function(result) {
var JsonData=Ext.util.JSON.decode(result.responseText);
arr=JsonData.data.result;
},
failure:function(result,response) {
alert('ajax failed');
}

});

JSP PART:

String JsonStr="{\"success\":true,\"data\":{\"result\":\" "+result+"\"}}";
response.setContentType("text/html;charset=iso-8859-9");
response.getWriter().write(JsonStr);

evant
22 Feb 2010, 8:30 PM
You aren't creating an instance of it.



var conn = new Ext.data.Connection();

extjsuser2010
23 Feb 2010, 7:35 PM
yup tried it. still not working...