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?
Announcement
Collapse
No announcement yet.
Display current query in zoom search box
Collapse
X
-
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".
Comment
-
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
Comment