Tags:
create new tag
view all tags

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

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  

-- 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

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2004-06-16 - CrawfordCurrie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.