PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Display current query in zoom search box

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

  • Display current query in zoom search box

    Hi, I link back to a shtml page that has an embedded cgi search form. Everything works great, except the user's current query does not appear in the search box as it does when running a search form without a link back. I tried incorporating ZOOM_SHOW_HEADING as the zoom_query value but I suppose that since the form has not yet been submitted it does not yet have a value. Can you please advise as to how to I can have the user's current query appear in the search box in this circumstance?

  • #2
    What code are you using on the SHTML page to include the CGI?

    Comment


    • #3
      Hi, I have set the form action to the link back page in this manner

      Code:
      <form action="query.shtml">
      <input type="text" name="zoom_query" size="40" >
      <input type="hidden" name="zoom_per_page" value="20">
      <input type="submit" name="submit" value="Search" />
      </form>

      Comment


      • #4
        That is the HTML form that submits the query to the SHTML page. That is not what's in the SHTML page which embeds the CGI as requested.

        Having said that, if you are trying to get the search query to show up in your own HTML form (not the one generated by the CGI), then you need to use your own scripting to do so. There is nothing the CGI can do to pre-populate a HTML form that is outside of the CGI's output.

        This is why in most cases (and ideally), you would use the CGI's generated form, and modify this via CSS or the Advanced Template options (in search_template.html) only. <!--ZOOM_SHOW_HEADING--> etc. only work within "search_template.html".
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          Thank you Ray, I originally included the search.cgi in the shtml page, but wanted the flexibility of using a form for formatting purposes. I wrote a PHP script to parse the query from the url, so I will try to use that to assign the current query to the zoom_query value. If that doesn't work I might return to including the search.cgi. Thank you for your help.

          Comment

          Working...
          X