검색바 다는 방법좀.. 정보
검색바 다는 방법좀..본문
search.php 로 실행하면 바로 통함검색페이지로 넘어가는데요.
그냥 메뉴바만 달고 거기서 검색결과 나올때 통함검색페이지로 넘어가게 하고 싶은데요.
원하는 위치에 넣을 수 있도록 코드좀 알려주세요. 너무 초보적인 질문인거 같아 저도 난감하네요 ㅡㅡ;
댓글 전체
그누기본형 검색바
-----------------------------------------------------------------------------
<!-- 검색 시작 -->
<table width="<?=$table_width?>" cellspacing="0" cellpadding="0">
<tr>
<td width="43" height="11"></td>
<td width="220"></td>
<td width=""></td>
<td width="234"><img src="<?=$g4['path']?>/img/search_top.gif" width="234" height="11"></td>
<td width="35"></td>
</tr>
<tr>
<td height="33"><img src="<?=$g4['path']?>/img/bar_01.gif" width="43" height="33"></td>
<td><img src="<?=$g4['path']?>/img/bar_02.gif" width="220" height="33"></td>
<td background="<?=$g4['path']?>/img/bar_03.gif" width="472" height="33"><table width=100% cellpadding=0 cellspacing=0><tr><td width=25> </td><td><?//=popular();?></td></tr></table></td>
<td>
<table width="100%" height="33" cellspacing="0" cellpadding="0">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<!-- <input type="hidden" name="sfl" value="concat(wr_subject,wr_content)"> -->
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<tr>
<td width="25" height="25"><img src="<?=$g4['path']?>/img/search_01.gif" width="25" height="25"></td>
<td width="136" valign="middle" bgcolor="#F4F4F4"><INPUT name="stx" maxlengt=20 style="BORDER : 0px solid; width: 125px; HEIGHT: 20px; BACKGROUND-COLOR: #F4F4F4" maxlength="20"></td>
<td width="12"><img src="<?=$g4['path']?>/img/search_02.gif" width="12" height="25"></td>
<td width="48"><input type="image" src="<?=$g4['path']?>/img/search_button.gif" width="48" height="25" border="0"></td>
<td width="13"><img src="<?=$g4['path']?>/img/search_03.gif" width="13" height="25"></td>
</tr>
<tr>
<td width="234" height="8" colspan="5"><img src="<?=$g4['path']?>/img/search_down.gif" width="234" height="8"></td>
</tr>
</form>
</table></td>
<td></td>
</tr>
</table>
<script language="JavaScript">
function fsearchbox_submit(f)
{
if (f.stx.value == '')
{
alert("검색어를 입력하세요.");
f.stx.select();
f.stx.focus();
return;
}
/*
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++)
{
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1)
{
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return;
}
*/
f.action = "<?=$g4['bbs_path']?>/search.php";
f.submit();
}
</script>
<!-- 검색 끝 -->
---------------------------------------------------------------------------
기본형 아닌것은
http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=1330
http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=15124
그대로 따라하시면 됩니다..
-----------------------------------------------------------------------------
<!-- 검색 시작 -->
<table width="<?=$table_width?>" cellspacing="0" cellpadding="0">
<tr>
<td width="43" height="11"></td>
<td width="220"></td>
<td width=""></td>
<td width="234"><img src="<?=$g4['path']?>/img/search_top.gif" width="234" height="11"></td>
<td width="35"></td>
</tr>
<tr>
<td height="33"><img src="<?=$g4['path']?>/img/bar_01.gif" width="43" height="33"></td>
<td><img src="<?=$g4['path']?>/img/bar_02.gif" width="220" height="33"></td>
<td background="<?=$g4['path']?>/img/bar_03.gif" width="472" height="33"><table width=100% cellpadding=0 cellspacing=0><tr><td width=25> </td><td><?//=popular();?></td></tr></table></td>
<td>
<table width="100%" height="33" cellspacing="0" cellpadding="0">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<!-- <input type="hidden" name="sfl" value="concat(wr_subject,wr_content)"> -->
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<tr>
<td width="25" height="25"><img src="<?=$g4['path']?>/img/search_01.gif" width="25" height="25"></td>
<td width="136" valign="middle" bgcolor="#F4F4F4"><INPUT name="stx" maxlengt=20 style="BORDER : 0px solid; width: 125px; HEIGHT: 20px; BACKGROUND-COLOR: #F4F4F4" maxlength="20"></td>
<td width="12"><img src="<?=$g4['path']?>/img/search_02.gif" width="12" height="25"></td>
<td width="48"><input type="image" src="<?=$g4['path']?>/img/search_button.gif" width="48" height="25" border="0"></td>
<td width="13"><img src="<?=$g4['path']?>/img/search_03.gif" width="13" height="25"></td>
</tr>
<tr>
<td width="234" height="8" colspan="5"><img src="<?=$g4['path']?>/img/search_down.gif" width="234" height="8"></td>
</tr>
</form>
</table></td>
<td></td>
</tr>
</table>
<script language="JavaScript">
function fsearchbox_submit(f)
{
if (f.stx.value == '')
{
alert("검색어를 입력하세요.");
f.stx.select();
f.stx.focus();
return;
}
/*
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++)
{
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1)
{
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return;
}
*/
f.action = "<?=$g4['bbs_path']?>/search.php";
f.submit();
}
</script>
<!-- 검색 끝 -->
---------------------------------------------------------------------------
기본형 아닌것은
http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=1330
http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=15124
그대로 따라하시면 됩니다..
와~~~~ 너무나 감사합니다. 전 최신글이나 아웃로그인 한줄코드 입력처럼 간단할줄 알았는데... ^^;