검색창 수정을하고 검색을 해보니..에러가있습니다.

검색창 수정을하고 검색을 해보니..에러가있습니다.

QA

검색창 수정을하고 검색을 해보니..에러가있습니다.

본문

검색창 수정을하고 검색을 해보니..에러가있습니다.

공지사항에 test라는 글이 있는데..검색에서 검색을 하면 아무것도 없다고 나옵니다.

혹시나해서 원본을 덮어서해보아도 여전히 그렇습니다..

혹시, 고수님들 아시는가요?

그누보드 youngcart5.0.43 버젼입니다.

 

수정전

css파일
#hd_sch {float:left;margin:0 0 0 20px;padding:0;border:1px solid #c3c6ca}
#hd_sch legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
#hd_sch #sch_stx {padding-left:5px;width:110px;height:24px;border:0;background:#fff;line-height:1.9em !important;line-height:1.6em}
#hd_sch #sch_submit {padding:0 5px;height:26px;border:0;background:#e2e6eb;color:#333;cursor:pointer}

 

 

head파일

<fieldset id="hd_sch">
            <legend>사이트 내 전체검색</legend>
            <form name="fsearchbox" method="get" action="<?php echo G5_BBS_URL ?>/search.php" onsubmit="return fsearchbox_submit(this);">
            <input type="hidden" name="sfl" value="wr_subject||wr_content">
            <input type="hidden" name="sop" value="and">
            <label for="sch_stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
            <input type="text" name="stx" id="sch_stx" maxlength="20">
            <input type="submit" id="sch_submit" value="검색">
            </form>

            <script>
            function fsearchbox_submit(f)
            {
                if (f.stx.value.length < 2) {
                    alert("검색어는 두글자 이상 입력하십시오.");
                    f.stx.select();
                    f.stx.focus();
                    return false;
                }

                // 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
                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 false;
                }

                return true;
            }
            </script>
        </fieldset>

 

 

수정후-----------------------------------------------------------------------------

head수정

<div id="hd_sch"> 

             <form name="fsearchbox" method="get" action="<?php echo G5_BBS_URL ?>/search.php" onsubmit="return fsearchbox_submit(this);">            

<input type="hidden" name="sfl" value="wr_subject||wr_content"> 

             <input type="hidden" name="sop" value="and"> 

                  <label for="sch_stc" id="sch_stc_label">검색어<strong class="sound_only"> 필수</strong></label> 

                  <input type="text" name="stx" value="" id="sch_stc" required > 

                  <button type="submit" id="sch_top" alt="검색"></button> 

              </form> 

             <script> 

             function fsearchbox_submit(f) 

             { 

                 if (f.stx.value.length < 2) { 

                     alert("검색어는 두글자 이상 입력하십시오."); 

                     f.stx.select(); 

                     f.stx.focus(); 

                     return false; 

                 } 

                 // 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요. 

                 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 false; 

                 } 

                 return true; 

             } 

             $(function() { 

                 var $sch = $('#sch_stc');   //검색 input 

                 var $sch_label = $('#sch_stc_label');    //검색 label 

                 if ($sch.attr('value') == "") $sch_label.css('visibility','visible'); 

                 else  $sch_label.css('visibility','hidden'); 

                 $sch.focus(function() { 

                     $sch_label.css('visibility','hidden'); 

                 }); 

                 $sch.blur(function() { 

                     $this = $(this); 
                     if ($this.attr('id') == "sch_stc" && $this.attr('value') == "") $sch_label.css('visibility','visible'); 

                }); 

             }); 

             </script> 

        </div>

 

 

css 수정

#sch_stc{border:1px solid #c3c6ca;height:26px;width:198px;float:left;border-right:none;padding:0 15px;line-height:28px;color:#8b8b8b;font-size:1em;/*height:42px\9;*/ } 
#hd_sch form{position:relative;} 
#hd_sch label {position: absolute;top: 10px;left: 17px;color: #839298} 
#sch_top{width:35px;height:28px; background:url('../img2/top/s.jpg') no-repeat;border:0;float:left;}​

이 질문에 댓글 쓰기 :

답변 2

답변을 작성하시기 전에 로그인 해주세요.
전체 7
QA 내용 검색

회원로그인

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