t

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

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

<table border="0" width="430" cellpadding="0" cellspacing="0">
<tr>
<td height="113" colspan="3" width="430"> </td>
</tr>
<tr>
<td width="160"> </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라는 값을 넣어야 해당 게시판으로 가게 하려합니다.
어거지로 수정해서 쓰려니 이렇게 하는게 아닌지 안되네요..
부디 해결할 수 있길 바래봅니다. ^^

댓글 1개

소스를 보니 하고자 하는 일이 무엇인지 모르겟네요
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()
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
10-06-23 조회 1,555
10-06-23 조회 1,533
10-06-23 조회 1,522
10-06-23 조회 1,621
10-06-22 조회 1,327
10-06-22 조회 1,267
10-06-22 조회 1,556
10-06-22 조회 1,780
10-06-22 조회 1,620
10-06-22 조회 1,667
10-06-22 조회 1,195
10-06-22 조회 1,605
10-06-22 조회 1,254
10-06-22 조회 1,799
10-06-22 조회 1,617
10-06-22 조회 1,121
10-06-21 조회 1,331
10-06-21 조회 1,905
10-06-21 조회 1,616
10-06-21 조회 1,618