我在我的开发服务器上使用我的WordPress站点,试图获得一个自定义插件来调用restful服务。该插件使用jQuery和Ajax引用JavaScript文件。当我更改单选按钮的状态时,我正在尝试调用restful服务来获取一些数据。执行下面的代码,屏幕上显示的结果是"Here are The are:“,所以看起来调用了web服务,没有返回任何数据。我在web服务中进行了一些日志记录,这样我就可以确定web服务实际上正在被调用,并且看起来好像从未从该代码中调用过web服务。所以我有很多问题,比如你看到我哪里错了吗?当成功函数显然没有命中服务时,它为什么会被调用?我能做些什么来调试它?
jQuery.ajax({
url: "http://myAwesomeServer:8080/myAwesomeService.svc/GetAwesomeData/Hurry",
type:"GET",
success:function(data) {
jQuery(".customConfigurator").text('Here are the awesome results:');
jQuery(".customConfigurator").append(data);
die();
},
error: function(MLHttpRequest, textStatus, errorThrown){
//console.log(errorThrown);
alert(errorThrown);
}
});发布于 2015-01-19 12:52:59
请参阅上面的注释。我只需要关闭缓存...
https://stackoverflow.com/questions/28011775
复制相似问题