We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5811
    • 1,717 Posts
    but can not find the style information?
    From ajaxSearch_version180.txt:
    For each field named "xxxx" we will have:
    [+as.xxxx+] the content of the field named xxxx
    [+as.xxxxShow+] a boolean value which is equal to 0 when xxxx='', 1 otherwise
    [+as.xxxxClass+] a class name equal to:
    - ajaxSearch_resultXxxx for the non ajax results (&tplResult)
    - AS_ajax_resultXxxx for the ajax window (&tplAjaxResult)
    So for instance for non-ajax mode you will get:

    - class="ajaxSearch_resultLink" for link
    - class="ajaxSearch_resultDescription" for description
    - class="ajaxSearch_resultExtract" for extract

    ... and so on.

    For the other templates (layout or pagin) read the ajaxSearch_readme text for other class names. These names haven’t been changed.
      • 24904
      • 79 Posts
      Quote from: coroico at Oct 07, 2008, 06:23 AM

      but can not find the style information?
      From ajaxSearch_version180.txt:
      For each field named "xxxx" we will have:
      [+as.xxxx+] the content of the field named xxxx
      [+as.xxxxShow+] a boolean value which is equal to 0 when xxxx='', 1 otherwise
      [+as.xxxxClass+] a class name equal to:
      - ajaxSearch_resultXxxx for the non ajax results (&tplResult)
      - AS_ajax_resultXxxx for the ajax window (&tplAjaxResult)
      So for instance for non-ajax mode you will get:

      - class="ajaxSearch_resultLink" for link
      - class="ajaxSearch_resultDescription" for description
      - class="ajaxSearch_resultExtract" for extract

      ... and so on.

      For the other templates (layout or pagin) read the ajaxSearch_readme text for other class names. These names haven’t been changed.


      yep I found those tags in the layout file but cant feel the css for them.
      what im trying to do is change the search button to an image button.
      cant figure out how to do this, well not yet anythings, still trying to figure out how where everything is.
        • 5811
        • 1,717 Posts
        what im trying to do is change the search button to an image button.
        cant figure out how to do this, well not yet anythings, still trying to figure out how where everything is.
        Replace
               <input id="ajaxSearch_input" class="cleardefault" type="text" name="search" value="[+as.inputValue+]"[+as.inputOptions+] />
        by
                 <input id="ajaxSearch_submit" class="cleardefault"  src="assets/snippets/ajaxSearch/images/zoom.gif" type="image" name="search" alt="Search" value="[+as.inputValue+]"[+as.inputOptions+]  />
        in the file templates/layout.tpl.html. And in your css file, style this input form as you want. For instance:
        #ajaxSearch_input {
        width:130px;
        background:#FFF;
        font-size:0.9em;
        border:2px inset gray;
        padding:3px 2px 2px;
        float: left;
        margin:0;
        }
        
        #ajaxSearch_submit {
        background:none;
        border:none;
        width:16px;
        margin: 3px 2px 0;
        float:left;
        }
        
        #ajaxSearch_output {
        font-size:0.9em;
        background-color:#EFEFEF;
        border:1px solid #6F9303;
        color:#000;
        position:absolute;
        top:50px;
        right:10px;
        width:250px;
        z-index:1;
        margin:0;
        padding:5px;
        }


          • 24904
          • 79 Posts
          thanks mate.

          Everything works fine now, except for 1 problem, results are shown twice in the search result page.


          ----------------------------------
          In my layout.tpl.html
          I have
          [+as.showForm:is=`1`:then=`
                  <div id="HeaderContainer_search">
                      <div id="HeaderContainer_login">
                          <a href="client-login.html"><img src="http://www.mydomain.com/images/login.gif" alt="Login" width="103" height="23" border="0" /></a>            
                      </div>
          
                      <div id="HeaderContainer_searchbox">
                          <form [+as.formId+] action="[+as.formAction+]" method="post">
                          	<input type="hidden" name="advSearch" value="[+as.advSearch+]" />
                              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                      <td align="right" class="search">Search:</td>
                                      <td width="195" align="right"><input id="ajaxSearch_input" name="search" type="text" class="SearchBasicInputBox" value="[+as.inputValue+]"[+as.inputOptions+] /></td>
                                      <td width="40" align="right"><input id="ajaxSearch_submit" type="image" name="sub" value="[+as.submitText+]" src="http://www.mydomain.com/images/btn_search.gif" alt="Go" /></td>
                                  </tr>
          
                              </table>
                          </form>
                      </div>
                  </div>
          
          
          `+]
          [+as.showResults:is=`1`:then=`
          [+as.results+]
          `+]
          


          search result page:
          [!AjaxSearch? &ajaxSearch=`0` &AS_landing=`30` &extract=`1`!]

          [!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0`!]



          why does the result show twice?
            • 24904
            • 79 Posts
            If I however remove the search box from the search result page
            [!AjaxSearch? &ajaxSearch=`0` &AS_landing=`30` &extract=`1`!]
            


            everything works fine. but then i cant search while im on the search result page.
              • 5811
              • 1,717 Posts
              but then i cant search while im on the search result page
              See the "same page" demo on the AS demo site. Try for instance "education".
              To get results on the search page, you need to provide the same id for the result page (landing page) and the search input page.
                • 24904
                • 79 Posts
                I can see what is wrong with it now.

                Ok how do I show the results where i want it.

                This is my header (every page has a header and it contains the search box)
                ******************
                search header
                ******************
                menu header
                ******************
                body
                ******************
                footer
                ******************

                I would like to show the results in the body, not under "search header".
                  • 24904
                  • 79 Posts
                  coroico : PM sent.
                    • 24904
                    • 79 Posts
                    The reason why the search results shows up twice on the results page is because I have two lines....
                    ie
                    [!AjaxSearch? &ajaxSearch=`0` &AS_landing=`30` &extract=`1`!]
                    and
                    [!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0`!] <-- I have now removed this line from the result page.

                    Now It shows the results on top of the header!! only!
                      • 5811
                      • 1,717 Posts
                      Thanks Revolver for your PM. For me it is rewarding to see your site works fine.

                      And I understand now why you are wake up before me ! laugh