document.getElementById("progressOwnArea").style.visibility="visible";
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status!=200)//오류
{
alert("오류가 발생하였습니다.");
document.getElementById("progressOwnArea").style.visibility="hidden";
return;
}
if (xmlhttp.readyState==4 && xmlhttp.status==200)//수정 성공
{
//alert("수정하였습니다.");
document.getElementById("progressOwnArea").style.visibility="hidden";
window.parent.location.reload();
window.location.reload();
return;
}
}
//쿼리스트링 생성
var queryString="";
var frm=document.forms[0];
var numberElements=frm.elements.length-1;
for(var i=0;i<numberElements;i++){
if(i<numberElements-1){
queryString+=frm.elements[i].name+"="+encodeURIComponent(frm.elements[i].value)+"&";
}else{
queryString+=frm.elements[i].name+"="+encodeURIComponent(frm.elements[i].value);
}
}
xmlhttp.open("POST","/adm/memberMgr/member_modi_save.jsp",true);
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8");
xmlhttp.send(queryString);
댓글 없음:
댓글 쓰기