PDA

View Full Version : Ajax Call to URL



DesiTesh
15 Feb 2010, 1:49 PM
Ext.onReady(function(){
Ext.Ajax.request({
//url: 'http://extjs.org.cn/extjs/examples/grid/survey.html',
url: 'sampledata.html',
success: function(response){
var features = Ext.util.JSON.decode(response.responseText);
alert("Success");
},
failure: function(response){
alert("Failed");
}

});

var proxy=new Ext.data.HttpProxy( {url:'sampledata.html'});
var reader=new Ext.data.JsonReader(
.....


This code doesnt work. I get "Failed" alert, means its going to failure.