我想弄清楚我在做什么错在这里。基本上我试图从获得一个成功的回调:jQuery Ajax问题
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/project?f=pjson&inSR=4326&outSR=102113&geometries={"geometryType":"esriGeometryPoint","geometries":[{"x":-117,"y":34}]}
当粘贴到浏览器中,我得到的数据,当我在做这在Javascript中,它调用错误处理程序不起作用。有任何想法吗?我用小提琴来比较请求,发现真的没有区别。
$.ajax({
type: 'GET',
url: 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/project?f=pjson&inSR=4326&outSR=102113&geometries={"geometryType":"esriGeometryPoint","geometries":[{"x":-117,"y":34}]}',
success: function(data){
alert('success');
},
error: function(jqXHR, textStatus, errorThrown){
alert('error');
}
});
在没有任何反应,不会因为你的错误功能工作不工作时被调用,不工作的在你的成功功能被称为但没有数据或不工作,因为在任何时候你尝试它你的电脑着火?或者其他“不起作用”。 – Chris 2011-03-17 15:04:26
在调用错误处理程序时不起作用。 – 2011-03-17 15:06:50
@LB - 错误的textStatus和响应代码是什么? – justkt 2011-03-17 15:07:30