이런 애러 왜그럴까요?

이런 애러 왜그럴까요?

QA

이런 애러 왜그럴까요?

본문

크롬에서 체디터로 댓글 쓰기시에 댓글 올라가는데 내용이 사라집니다.

잘올라가다 어떤거는 내용이 사라진 상태로 올라갑니다.

 

관련 있는지는 모르겠지만

포인트 내역보면 248385-248486 댓글쓰기 이렇게 나오잖아요.. 

클릭하여 

링크 연결되면 테이블명과 wr_id 사이에

&이 사라져서 존재하지 않는 게시판입니다. 이렇게 나오는 현상이 있네요..

bo_table=qawr_id=

이렇게 왜 포인트 내역 기록되면서 & 이 사라지는건지.

어디를 살펴봐야 할지.,.유유

이 질문에 댓글 쓰기 :

답변 3

writeskin
 php파일 만지셨나요?
화면단 이벤트 클릭 코드를 좀 봐야할것 같은데..

댓글에 체디터 에디터를 붙이고 사용하고 있었는데요,,그간 이상없었는데 최근에서 크롬에서 댓글이 잘 달리다가도 어떤거는 내용이 날라가고 댓글이 등록되는 현상이...유유
문제가 있으면 아예 올라가지를 않아야지 잘 올라가다 어떤거는 문제가 생기는 경우가 있는지..

<script type="text/javascript">

var save_before = '';

var save_html = document.getElementById('comment_write').innerHTML;

 

 

 

function good_and_write()

{

    var f = document.fviewcomment;

    if (fviewcomment_submit(f)) {

        f.is_good.value = 1;

        f.submit();

    } else {

        f.is_good.value = 0;

    }

}

 

function fviewcomment_submit(f)

{

    var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자

 

<?php echo get_editor_js("wr_content"); ?>

 

    f.is_good.value = 0;

 

    <?php if (!$is_member) { ?> 

    if (document.getElementById('tx_wr_content')) { 

        if (!ed_wr_content.outputBodyText()) { 

            alert('내용을 입력하십시오.'); 

            ed_wr_content.returnFalse(); 

            return false; 

        } 

    } 

    <?php } ?> 

 

 

 

 

 

    // 양쪽 공백 없애기

    var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자

    document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");

 

    if (char_min > 0 || char_max > 0)

    {

        check_byte('wr_content', 'char_count');

        var cnt = parseInt(document.getElementById('char_count').innerHTML);

        if (char_min > 0 && char_min > cnt)

        {

            alert("코멘트는 "+char_min+"글자 이상 쓰셔야 합니다.");

            return false;

        } else if (char_max > 0 && char_max < cnt)

        {

            alert("코멘트는 "+char_max+"글자 이하로 쓰셔야 합니다.");

            return false;

        }

    }

    else if (!document.getElementById('wr_content').value)

    {

        alert("코멘트를 입력하여 주십시오.");

        return false;

    }

 

    if (typeof(f.wr_name) != 'undefined')

    {

        f.wr_name.value = f.wr_name.value.replace(pattern, "");

        if (f.wr_name.value == '')

        {

            alert('이름이 입력되지 않았습니다.');

            f.wr_name.focus();

            return false;

        }

    }

 

    if (typeof(f.wr_password) != 'undefined')

    {

        f.wr_password.value = f.wr_password.value.replace(pattern, "");

        if (f.wr_password.value == '')

        {

            alert('패스워드가 입력되지 않았습니다.');

            f.wr_password.focus();

            return false;

        }

    }

 

    <?php if($is_guest) echo chk_captcha_js();  ?>

 

    set_comment_token(f);

 

    document.getElementById("btn_submit").disabled = "disabled";

 

    return true;

}

 

<? if($is_dhtml){ ?>

function comment_box(comment_id, work)

{

    var el_id;

    // 코멘트 아이디가 넘어오면 답변, 수정

    if (comment_id)

    {

        if (work == 'c'){

            el_id = 'reply_' + comment_id;

ed_<?=$id?>.cheditor.toolbarWrapper.style.display = 'none';

}

        else{

            el_id = 'edit_' + comment_id;

ed_<?=$id?>.cheditor.toolbarWrapper.style.display = '';

}

}

    else{

        el_id = 'comment_write';

ed_<?=$id?>.cheditor.toolbarWrapper.style.display = '';

}

 

    if (save_before != el_id)

    {

        if (save_before)

        {

            //document.getElementById(save_before).style.display = 'none';

            //document.getElementById(save_before).innerHTML = '';

        }

 

        document.getElementById(el_id).style.display = '';

        //document.getElementById(el_id).innerHTML = save_html;

        // 코멘트 수정

        if (work == 'cu')

        {

ed_<?=$id?>.replaceContents(document.getElementById('save_comment_' + comment_id).value);

            //document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;

            if (typeof char_count != 'undefined'){

                //check_byte('wr_content', 'char_count');

}

            if (document.getElementById('secret_comment_'+comment_id).value)

                document.getElementById('wr_secret').checked = true;

            else

                document.getElementById('wr_secret').checked = false;

        }

else if (work=='c')

{

ed_<?=$id?>.replaceContents('');

}

 

        document.getElementById('comment_id').value = comment_id;

        document.getElementById('w').value = work;

 

        save_before = el_id;

    }

 

    if (typeof(wrestInitialized) != 'undefined'){

        //wrestInitialized();

}

 

//-------------------------------에디터 이동을 정의

if(comment_id)

{

if(work=='c' || work=='cu')

{

change_editor(comment_id);

jQuery("#comment_mode").empty().append("현재 "+((work=='c')?"댓글에 대한 답변모드":"수정모드")+" 입니다.   <a href=\"javascript:comment_box('','c')\">[댓글쓰기]</a>");

}

}

else

{

change_editor_reset();

jQuery("#comment_mode").empty().append("");

}

//------------------------------

 

 

 

    //jQuery(this).kcaptcha_load();

    if (comment_id && work == 'c')

        $.kcaptcha_run();

}

 

 

 

//-------------------------------------에디터 이동을 정의

function change_editor(comment_id)

{

var div_index = 0 ; 

var table_index = 0 ; 

jQuery("#commentContents .comment_list").each(function(index){

var id_name = jQuery(this).attr("id"); //각각의 이름을 구한다

if(id_name=="comment_write")

{

div_index = index ; 

}

else if(id_name == ("modify_"+comment_id))

{

table_index = index ; 

}

});

var set_list = jQuery("#commentContents .comment_list");

var fix_list = jQuery("#comment_write");

if((div_index-1)>table_index)

{

//위의내용을 아래로 옮긴다

for(var i = (div_index-1); i > table_index ; i--)

{

fix_list.after(set_list.eq(i));

}

}

else if(div_index < table_index)

{

//아래의 내용을 위로 올린다

for(var i = div_index+1 ; i <= table_index ; i++)

{

fix_list.before(set_list.eq(i));

}

}

}

 

 

function change_editor_reset()

{

var div_index = 0 ; 

var table_index = 0 ; 

jQuery("#commentContents .comment_list").each(function(index){

var id_name = jQuery(this).attr("id");

if(id_name=="comment_write"){

div_index = index ; 

}

table_index = index ; 

});

if(table_index > div_index)

{

var set_list = jQuery("#commentContents .comment_list");

var fix_list = jQuery("#comment_write");

//아래의 내용을 위로 올린다

for(var i = div_index+1 ; i <= table_index ; i++)

{

fix_list.before(set_list.eq(i));

}

}

}

//---------------------------------------

 

 

<? }else{ ?>

function comment_box(comment_id, work)

{

    var el_id;

    // 코멘트 아이디가 넘어오면 답변, 수정

    if (comment_id)

    {

        if (work == 'c'){

            el_id = 'reply_' + comment_id;

}

        else{

            el_id = 'edit_' + comment_id;

}

}

    else{

        el_id = 'comment_write';

}

 

    if (save_before != el_id)

    {

        if (save_before)

        {

            document.getElementById(save_before).style.display = 'none';

            document.getElementById(save_before).innerHTML = '';

        }

 

        document.getElementById(el_id).style.display = '';

        document.getElementById(el_id).innerHTML = save_html;

        // 코멘트 수정

        if (work == 'cu')

        {

            document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;

            if (typeof char_count != 'undefined')

                check_byte('wr_content', 'char_count');

            if (document.getElementById('secret_comment_'+comment_id).value)

                document.getElementById('wr_secret').checked = true;

            else

                document.getElementById('wr_secret').checked = false;

        }

 

        document.getElementById('comment_id').value = comment_id;

        document.getElementById('w').value = work;

 

        save_before = el_id;

    }

 

    if (typeof(wrestInitialized) != 'undefined')

        wrestInitialized();

 

}

 

 

 

 

<? } ?>

 

 

function comment_delete(url)

{

    if (confirm("이 코멘트를 삭제하시겠습니까?")) location.href = url;

}

 

comment_box('', 'c'); // 코멘트 입력폼이 보이도록 처리하기위해서 추가 (root님)

</script>

<? } ?>

</DIV>


답변을 작성하시기 전에 로그인 해주세요.
전체 129,678 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT