我有一个简单的链接列表,所以当每一个被点击时,我应该有一个对话框弹出,里面有更多的信息,从DB获得,并张贴回该对话框作为json对象。
现在的问题是,这个设置在我的一台服务器上工作,而在另一台服务器上不起作用。两个服务器都在运行Apache,两个服务器都非常相似,除了一件事,第一(工作的一个)是VPS,第二个是共享主机,我真的不确定这是否有什么关系,但这是唯一留给我考虑的事情。
<head>
<link rel=stylesheet href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/start/jquery-ui.css" type="text/css">
<script type="text/javascript" src="/js/jquery-1.8.2.min.js"></script>
<script>
function user_dialog(a,b){
"undefined"!=typeof jQuery.ui?($("#dialog").attr("title","Detailed Information").html(a),
$("#dialog").dialog({
modal:true,
width:400,
buttons: {
Cancel: function() {
$(this).dialog("close");
},
Download: function(){
$(this).dialog("close");
window.location=b
}
}
}
))
:window.location=b}
function user_notice(a){
download_link=$(a).attr("href");
$.ajax({
type:"POST",
url:"/includes/json.php",
data:"action=reminder&thepath="+download_link,
dataType:"json",
error:function(){
window.location=download_link
},
success:function(a){
1==a.status&&user_dialog(a.html,download_link);
}
})
};
</script>
</head>
<body>
<div class="bb_button"><a class="bb_xls" href=" " rel="nofollow" onClick=" user_notice(this,''); return false;">Download Now</a></div>
<div id="dialog" style="display:none;"> <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
<div id="g_plus_message"></div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js?ver=1.10.1"></script>
</body>
任何帮助都是非常感谢的
我在json.php中发现了一个错误。
导致我所有问题的错误是我有以下代码行
header('Status: 403 Forbidden');
Thanks to Andrej