我对 ashx 处理程序的每次调用都导致我在 Firefox 中收到“未找到元素”错误,但在执行对该处理程序的调用时我的网站不会崩溃。我还收到“HierarchyRequestError:无法在层次结构中的指定点插入节点”。下面是给我这两个错误的代码:
$.post("checkout_model.ashx?a=CheckSession", function (data) {
// if session is still available
alert(data);
if ($.trim(data).length > 0) {
$.post("checkout_model.ashx?a=SaveAddress", $("#addressdetails").serialize(), function (data) {
$("#addressresult p.result").remove();
$("#addressresult").prepend(data);
});
storeCookies();
// update orderdetails
$.post("checkout_model.ashx?a=GetCartContent", function (data) {
$("#orderdetails").html(data);
});
var address = $("#AddressLine1").val();
if ($("#AddressLine2").val() != "") address += ", " + $("#AddressLine2").val();
address += ", " + $("#Suburb").val();
$("#tabaddress").text("Step 1: Modify Address: " + address);
$("#accordion").accordion("option", "active", 1);
$("#tabaddress").addClass("modifyaddress");
$("#tabpayment").removeClass("disabled"); // enable step 3
} else {
$("#addressdetails").html("<p class='error'>Your order has timed out. You will need to <a href='viewcart.aspx'>select the items</a> to purchase again.</p>")
}
});