Tags:
create new tag
, view all tags

Question

I am developing a customised advanced search page for our TWiki web. I have different categories of pages, and multiple possible topics in which I would like to display the search results. For example, I have an overall results topic in which search results are displayed in multiple columns for the different categories, and individual results topics for each category without the multi-column layout.

Each result page contains one or more embbeded

%SEARCH%
s that extract search term and parameters from
%URLPARAMS%
.

What would be the best way to allow the selection of a different output page, dependent on the form parameters?

I have tried the following to no avail:

- Conditional setting of customised content variables dependent on url parameters which could be received and displayed in template files- until I realised that was impossible.

- JavaScript to create multiple submits with different actions assoicated with the onClicks.

All pointers appreciated.

Jon

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Fedora 8
Web server: Apache 2
Perl version: 5.8.8
Client OS: Fedora 8
Web Browser: Firefox 2
Categories: Forms, Search, Javascript, Deployment

-- JonathanManning - 21 May 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

I don't completely understand what you are trying to achieve. One search result page where topics of different categories are combined?

-- ArthurClemens - 21 May 2008

Thanks for the reply. No, I already have that really- I have a results page that runs 3 searches over 3 different category types from the same set of url parameters passed from a search page. The result are assigned to separate content variables, and displayed in separate columns of the results page by use of a template.

If the user selects a singe topic type, however, I would like to provide more information, and would use a different topic to display the results with a different embedded formatted search.

Bottom line: is it possible to conditionally use different topics as actions from a submitted form, dependent on the content of that form?

-- JonathanManning - 21 May 2008

Okay, the JavaScript-type solution mentioned here:

http://www.web-source.net/web_development/form_action.htm

does in fact seem to work. Thanks!

Jon

-- JonathanManning - 21 May 2008

 
Change status to:
Topic revision: r3 - 21 May 2008 - 14:19:22 - JonathanManning
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback