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 질문답변

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

+
제목 글쓴이 날짜 조회
15년 전 조회 1,461
15년 전 조회 1,451
15년 전 조회 1,553
15년 전 조회 1,243
15년 전 조회 1,191
15년 전 조회 1,467
15년 전 조회 1,705
15년 전 조회 1,546
15년 전 조회 1,591
15년 전 조회 1,110
15년 전 조회 1,534
15년 전 조회 1,181
15년 전 조회 1,701
15년 전 조회 1,545
15년 전 조회 1,055
15년 전 조회 1,257
15년 전 조회 1,836
15년 전 조회 1,541
15년 전 조회 1,536
15년 전 조회 1,597