Question
Hi,
I am trying to search in form fields. So I use formatted search. My search page have a drop box where I can choose the form field from its list, a text box to type key words and of course a "Go" button. But my problem is that the result is always displayed in the same page where I enter the keyword. Moreover, by default, there are always some results in the search page even when I dont search anything. How to display the result in a new page?
Environment
--
ThienAnVo - 30 May 2004
Answer
You could simply move that search to another page and put a link in the first page that just invokes the URL of the new page with all the URL parameter values (taken from the drop box etc). For example, say I have:
<form name="searchaction" action="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/%TOPIC%#QueryByExample">
| Who: | <input type="text" name="qwho" value="%URLPARAM{"qwho" default=".*"}%" size="20" /> |
| State: | <select name="qstate"> <option>%URLPARAM{"qstate" default=".*"}%</option> <option>open</option> <option>late</option> <option>closed</option> <option></option> </select> |
</form>
Result:
%ACTIONSEARCH{ who="%URLPARAM{"qwho"}%" state="%URLPARAM{"qstate"}%" }%
would become:
<form name="searchaction" action="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/MyNewPage">
| Who: | <input type="text" name="qwho" value="%URLPARAM{"qwho" default=".*"}%" size="20" /> |
| State: | <select name="qstate"> <option>%URLPARAM{"qstate" default=".*"}%</option> <option>open</option> <option>late</option> <option>closed</option> <option></option> </select> |
</form>
and the ACTIONSEARCH would move to MyNewPage.
--
CrawfordCurrie - 16 Jun 2004