if(dossierId!=""){
if (confirm("您确定要设置不归档吗?")){
updateStatus(dossierId,update_status);
}
}else{
alert("没有选择记录!");
}
调用一下代码
===============================
var xmlHttp;
function createXMLHttpRequest() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
}
function updateStatus(dossierId,status){
createXMLHttpRequest();
var myUrl = "/jsp/module/dossier/beforehand/update_status.jsp?dossierId="+dossierId+"&status="+status;
xmlHttp.open("GET", myUrl, false);
xmlHttp.onreadystatechange=callbackCheck;
xmlHttp.send(null);
}
function callbackCheck(){
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
var check = xmlHttp.responseText;
if (check.indexOf("y")!= -1) {
alert("设置成功");
window.close();
//置不归档后返回当前页
window.location.href=window.location.href;
//window.location.href="/jsp/module/dossier/beforehand/beforehandDossier_list.jsp?radioType=<%=radioType%>&ownDeptName=<%=archivesTitle_hidden%>&ownDeptId=<%=ownDeptId%>&filecode=<%=filecode%>&dossierTitle=<%=dossierTitle_hidden%>&dossier_year=<%=dossier_year%>¬ionTime=<%=notionTime%>&dossierSign=<%=dossierSign%>&tableId=<%=tableId%>";
}else if(check.indexOf("n")!= -1){
alert("设置失败");
return false;
}
}
}
}