asp.net jquey ajax $post后台处理数据完成后,前台弹出DIV无法自动关闭
宝贝他爹 2014-03-21 11:43:50 这是前台
$("#_ButtonOK_1").click(function () {
if ($("#txtCustomerName").val() == "") {
$("#txtCustomerName").css("border", "1px solid red");
return;
} if ($("#txtDescrible").val() == "") {
$("#txtDescrible").css("border", "1px solid red");
return;
}
$loading_dlg.show();
$.post(
//'@Url.Action("Create")',
//'CreateSchedule.aspx',
'CreateSchedule.ashx',
{
"sWorkPlace": $("#txtCustomerName").val(),
"sSubject": $("#txtDescrible").val(),
"dSdate": $("#txtStartTime").val(),
"dEdate": $("#txtEndTime").val(),
"allDay": _allDay ? 1 : 0
},
function (data) {
$loading_dlg.hide();
if (data.statusCode == "200") {
var calEvent = {
title: $("#txtDescrible").val(),
start: $("#txtStartTime").val(),
end: $("#txtEndTime").val(),
id: data.args1,
suject: $("#txtCustomerName").val(),
editable: true,
allDay: _allDay,
RecDate: $("#txtRecDate").val()
};
$('#calendar').fullCalendar('renderEvent', calEvent, true);
hideDiv('ObjBox');
} else {
alert(data.message);
}
},
'json'
);
});
这是后台:
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
string strWorkPlace = context.Request["sWorkPlace"].ToString();
string strsSubject = context.Request["sSubject"].ToString();
}
怎么样才能后台处理完成后,自动关闭前台DIV弹出框的。兄弟姐妹们帮帮我