Ajax错误-请求外部页面时500内部服务器错误 [英] Ajax error - 500 internal server error when request an external page

查看:75
本文介绍了Ajax错误-请求外部页面时500内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.
我对ajax有问题.
这是我在div中加载页面或页面的一部分的代码.

hello everybody.
i have a problem with ajax.
this is my code to load a page or a part of it in a div.

$("a").click(function (event) {
    var Rel = $(this).attr("rel");//The class name want to load from Default2.aspx
    if (Rel) {
        $('.Content_Part').load("Default2.aspx ." + Rel )
    }
    event.preventDefault();
});



我当前的页面名称是"Default.aspx",目标页面是"Default2.aspx",问题是当我想从Default2.aspx加载某些内容时出现错误"500内部服务器错误",但是当我想要加载某些内容时从Default.aspx开始,一切都很好.
我正在使用此功能,它工作正常,但1小时后发生了此问题.
有什么问题?
谢谢您的关注.



my current page name is "Default.aspx" and the target page is "Default2.aspx", the problem is when i want to load something from Default2.aspx occur an error "500 internal server error" but when i want to load something from Default.aspx everything is OK.
i was using this function and it works fine but after 1 hour this problem occurred.
what''s the problem?
thank you for your attention.

推荐答案

(" ).单击( var Rel =
("a").click(function (event) { var Rel =


( this ).attr(" ); // 要从Default2.aspx加载的类名 如果(Rel){
(this).attr("rel");//The class name want to load from Default2.aspx if (Rel) {


(' .Content_Part').load(" + Rel) } event.preventDefault(); });
('.Content_Part').load("Default2.aspx ." + Rel ) } event.preventDefault(); });



我当前的页面名称是"Default.aspx",目标页面是"Default2.aspx",问题是当我想从Default2.aspx加载内容时出现错误"500内部服务器错误",但是当我想要加载内容时从Default.aspx开始,一切都很好.
我正在使用此功能,它工作正常,但1小时后发生了此问题.
有什么问题?
谢谢您的关注.



my current page name is "Default.aspx" and the target page is "Default2.aspx", the problem is when i want to load something from Default2.aspx occur an error "500 internal server error" but when i want to load something from Default.aspx everything is OK.
i was using this function and it works fine but after 1 hour this problem occurred.
what''s the problem?
thank you for your attention.


这篇关于Ajax错误-请求外部页面时500内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆