【发布时间】:2012-11-13 16:05:23
【问题描述】:
我尝试向该网址发送ajax delete 请求
但是弹出错误。
$( "#dialog-confirm" ).dialog({
resizable: false,
height:140,
modal: true,
buttons: {
"Delete": function() {
//To show the loader
//Ajax call to delete the data
$.ajax({
type: "DELETE",
url: window.location.pathname + id + '/centers/' + c,
contentType: 'application/html; charset=utf-8',
data: {
dc : dc,
},
success: function(){} }); });
错误是
此网页正在重定向到新位置。您想将您输入的表单数据重新发送到新位置吗?
https://my2.v2.domain.com/grd/net/lb/checker/Env2/centers/11
(这是我要发送的演示网址。)
提前致谢
【问题讨论】:
-
请提供更多信息 - 是什么触发了 AJAX?您实际使用的是什么代码?
-
IE 7 和 8 不支持
DELETE和PUT方法..stackoverflow.com/questions/2153917/… & stackoverflow.com/questions/2456820/… -
我在 Firefox 14.0.1 中试过,但同样的错误
-
您能否为您的代码创建一个 jsfiddle 来发出请求。将帮助我们调查问题。
-
什么是 'id' 参数,为什么要将它添加到路径名中?我认为你应该用“/”分隔路径名和 id。
标签: javascript python browser