상품등록 코드중복 ajax로 수정

This commit is contained in:
chicpro
2013-01-25 15:22:29 +09:00
parent aa46e077e8
commit 58bab3aa47
2 changed files with 29 additions and 21 deletions

View File

@ -848,7 +848,21 @@ function codedupcheck(id)
f.it_id.focus();
return;
}
window.open("./codedupcheck.php?it_id="+id+"&frmname=fitemform", "hiddenframe");
$.post(
"./codedupcheck.php",
{ id: id },
function(data)
{
if(data) {
alert("코드 "+id+" 는 '"+data+"' (으)로 이미 등록되어 있으므로\n\n사용하실 수 없습니다.");
return false;
} else {
alert("'"+id+"' 은(는) 등록된 코드가 없으므로 사용하실 수 있습니다.");
f.codedup.value = "";
}
}
);
}
// 선택옵션창