테스트 사이트 - 개발 중인 베타 버전입니다

게시글에 답변을 단 후, 리스트 페이지로 이동이 되지 않습니다. 채택완료

bismute 11년 전 조회 4,433

관리자 페이지에서 올라온 글에 답변을 달고, 버튼을 누르면

 

해당 OPTION태그의 값을 [접수중]에서 [답변완료]로 변경시키려고 합니다.

 

이런 경우 write_update.skin.php에서

 

alert("메시지"); 이런 식으로 되면, 메시지 출력후 뒤로 가기 입니다. 라고 도움을 얻어서

 

</p><p> </p><p><font face="돋움, Dotum, Helvetica, sans-serif"><span style="font-size: 12px; line-height: 18px;">if ($g4[https_url])</span></font></p><p><font face="돋움, Dotum, Helvetica, sans-serif"><span style="font-size: 12px; line-height: 18px;">    $https_url = "$g4[url]/$g4[bbs]";</span></font></p><p><font face="돋움, Dotum, Helvetica, sans-serif"><span style="font-size: 12px; line-height: 18px;">else</span></font></p><p><font face="돋움, Dotum, Helvetica, sans-serif"><span style="font-size: 12px; line-height: 18px;">    $https_url = ".";</span></font></p><p><font face="돋움, Dotum, Helvetica, sans-serif"><span style="font-size: 12px; line-height: 18px;">
</span></font></p><p><code class="plain" style="font-size: 12px; line-height: 23.54400062561035px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(248, 248, 248); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">alert(</code><code class="string" style="font-size: 12px; line-height: 23.54400062561035px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: blue !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(248, 248, 248); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">"답변이 완료되었습니다.", <span style="color: rgb(255, 0, 0); background-color: rgb(255, 255, 255);">"</span><span style="color: rgb(255, 0, 0); background-color: rgb(255, 255, 255);">{$https_url}/board.php?bo_table=$bo_table</span><span style="color: rgb(255, 0, 0); background-color: rgb(255, 255, 255);">"</span></code><code class="plain" style="font-size: 12px; line-height: 23.54400062561035px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(248, 248, 248); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">)</span>;</code></p><p>
 

 

 

이렇게 write_update.skin.php에서 사용을 했는데

 

메시지만 뜨고, 정작 리스트 페이지로 이동은 되지 않는 현상이 발생됩니다. 

 

무엇때문에 페이지 이동이 되지 않는 건지 다른 분들의 조언 부탁드립니다.

 

</p><p>//write_update.skin.php </p><p>if ($g4[https_url])
        $https_url = "$g4[url]/$g4[bbs]";
    else
        $https_url = ".";

    alert("답변이 완료되었습니다.", "{$https_url}/board.php?bo_table=$bo_table");
    $sql = " update $write_table set ca_name = '답변완료'
                    $sql_password 
                     where wr_id = '$wr[wr_id]' "; 
    sql_query($sql); </p><p>

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
11년 전

 

 

 

</p><p>//write_update.skin.php </p><p>if ($g4[https_url])</p><p>   $https_url = "$g4[url]/$g4[bbs]";</p><p>else</p><p>   $https_url = ".";</p><p> </p><p>$sql = " update $write_table set ca_name = '답변완료'</p><p>         $sql_password </p><p>       where wr_id = '$wr[wr_id]' "; </p><p>sql_query($sql); </p><p> </p><p>alert("답변이 완료되었습니다.", $https_url."/board.php?bo_table=$bo_table");</p><p> </p><p>
 

 

이렇게 한번 해보세요

 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

b
bismute
11년 전
alert에서 메시지까지는 뜨는데, $https_url."/board.php?bo_table=$bo_table" 이 부분이 안 도네요.
"./board.php?bo_table=$bo_table" 이렇게 강제로 주소값을 넣어봤는데 메시지까지만 뜨네요

echo "<script>document.location.href = './board.php?bo_table=$bo_table'</script>";
이 코드도 먹질 않네요.

댓글을 작성하려면 로그인이 필요합니다.

11년 전

alert() 말고

 

alert_go()로 해보세요

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

b
bismute
11년 전
alert_go()는 처음 보네요, 4버전이라서 그런가 alert_go는 작동하지 않는 거 같네요.

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인