메인페이지에서 입력란에 해당값을 넣고 버튼을 눌러야 해당 게시판으로 가게... > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

메인페이지에서 입력란에 해당값을 넣고 버튼을 눌러야 해당 게시판으로 가게... 정보

메인페이지에서 입력란에 해당값을 넣고 버튼을 눌러야 해당 게시판으로 가게...

본문

<form name=frm style="margin:0px;">

<table border="0" width="430" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td height="113" colspan="3" width="430">&nbsp;</td>
                                </tr>
<tr>
                                    <td width="160">&nbsp;</td>
                                    <td width="160">
                                   
                                            <input type="text" id="coupon" size="20" style="border-width:1; border-color:black; border-style:double;">
</td>
<td align="left" width="110">
        <a href="javascript:fn_write_submit();"><img src="images/cp_btn.jpg" width="86" height="27" border="0">
</a>                                                                         
</td>
                                </tr>
                            </table>
</form>

<script language="javascript">
function fn_write_submit(){

var f = document.frm;


if( "123ABC" = document.frm.coupon.value ){

alert("동의해야 합니다.");
return;

}

f.action = "../bbs/write.php?bo_table=s1";
f.submit();

}
</script>


input박스에 123ABC라는 값을 넣어야 해당 게시판으로 가게 하려합니다.
어거지로 수정해서 쓰려니 이렇게 하는게 아닌지 안되네요..
부디 해결할 수 있길 바래봅니다. ^^

댓글 전체

소스를 보니 하고자 하는 일이 무엇인지 모르겟네요
coupon box에 123abc를 넣어서 submit시키면 write.php에서 어떤 작업을 하는건가요?
어쨋거나 게시판에 write하는 법은 스킨폴더의 write.skin.php를 참조하면 될텐데요
이렇게 하면 됩니다
<form name='frm'>
<input type='hidden' name='w' value=''>
<input type='hidden' name='bo_table' value='s1'>
이 부분을 넣고 submit함수 부분에서
if( "123ABC" != document.frm.coupon.value ){alert(...); return;}
f.action="../bbs/write_update.php";
f.submit()
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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