blog/adm_category.php 파일 하단 스크립트에
새로고침 코드를 추가해주시면 됩니다.
function return_category_insert(req) {
err = false;
result = req.responseText;
switch(result) {
case '101': alert('자신의 블로그만 분류를 설정할 수 있습니다.'); err=true; break;
case '102': alert('분류 이름을 입력해주세요.'); err=true; break;
case '105': alert('같은 이름의 분류가 이미 존재합니다.'); err=true; break;
}
if( !err ) {
document.location.reload(); // 추가되는 코드
result = result.split('|');
index = $("ct_list").options.length;
ct_name = $("ct_name").value;
ct_id = result[1];
$("ct_list").options[index] = new Option(ct_name, ct_id, false, false);
$("ct_list").options[index].selected = true;
$("ct_name").value = '';
$("ct_name").focus();
}
}
댓글 2개
새로고침으로 해결하시면 다른 문제들이 있을 것 같은데..
일단 소스를 알려드리겠습니다.
blog/adm_category.php 파일 하단 스크립트에
새로고침 코드를 추가해주시면 됩니다.
function return_category_insert(req) {
err = false;
result = req.responseText;
switch(result) {
case '101': alert('자신의 블로그만 분류를 설정할 수 있습니다.'); err=true; break;
case '102': alert('분류 이름을 입력해주세요.'); err=true; break;
case '105': alert('같은 이름의 분류가 이미 존재합니다.'); err=true; break;
}
if( !err ) {
document.location.reload(); // 추가되는 코드
result = result.split('|');
index = $("ct_list").options.length;
ct_name = $("ct_name").value;
ct_id = result[1];
$("ct_list").options[index] = new Option(ct_name, ct_id, false, false);
$("ct_list").options[index].selected = true;
$("ct_name").value = '';
$("ct_name").focus();
}
}
감사합니다
근데 추가코드의 위치를 바꿔줘야한다는.. ^^; 하여튼 수정하고 삭제에도 추가해줬더니 잘됩니다.