PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

custom search form: input form is cleared on result.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • custom search form: input form is cleared on result.

    Hi,

    I followed the advice given in http://www.wrensoft.com/zoom/support/searchbox.html and inserted that form into my search_template.html. The actual search is trigered from search.asp

    It works fine except that when the search results are returned, the input form is cleared. Is there a way of retaining the user query string in the input form (as happens with the default search form)?

    Thanks and best regards,
    Peter

  • #2
    No easy way. If you create your own form, then the script won't auto populate the data in it.

    The demo code on the page you referenced is probably more suited to adding a search box on pages other than the search page (e.g. your home page) where the form doesn't need to be re-populated.

    But some other options are,
    1) Don't do your own search form, but instead style the default one using CSS. (the best solution maybe)

    2) Customize the code in search.asp

    3) Write some custom Javascript code to populate your form, based on the URL.

    Comment


    • #3
      Ah...

      Really, I just want to replace the HTML submit button with an image, or modify the look of the HTML button. I don't think I can do either of these with CSS - correct me if I'm wrong.

      For us slow ones at the back, could you show us how to change search.asp to use an image instead of the HTML button?

      Thanks and regards,
      Pete

      Comment


      • #4
        You can do that with just CSS in your "search_template.html" file, go to this page:
        http://www.wrensoft.com/zoom/support/css.html

        The whole page is worth reading but towards the bottom, there's a section entitled, "Example search form customized with CSS" that gives you an example where the search button is an image. Further up there's an example to just change the colour, etc.

        You do not need to change "search.asp" for this.

        Hope that helps!
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          Have super-imposition of two search buttons

          Thanks for that - that does help, and I do apologize for not reading the CSS article properly.

          However, when I do what it says, although I get the graphic button it is superimposed on the submit form button - so I get both. How do I get rid of the non-graphic button?

          Currently, the search_template.html has:
          <!--ZOOM_SHOW_FORMSTART-->
          <!--ZOOM_SHOW_SEARCHBOX-->
          <!--ZOOM_SHOW_SEARCHBUTTON-->
          <!--ZOOM_SHOW_CATEGORIES-->
          <!--ZOOM_SHOW_FORMEND-->

          Thanks,
          Pete

          Comment


          • #6
            You might've missed this detail from the article, below the example,

            The "Submit" search button text was also removed from the ZLANG language file.
            Under "Configure"->"Languages", you can modify the Language files and change any of the text on the search page (or remove the text). See chapter 7.2 in the Users Guide for more details.

            You will want to change:

            STR_FORM_SUBMIT_BUTTON=Submit

            To simply:

            STR_FORM_SUBMIT_BUTTON=

            You'll need to re-index for it to take effect. But that should do it.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #7




              ...embarrassed...

              Thanks

              Comment

              Working...
              X