value=

User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

value=

Post by Thunderstone »



The following is from the Thunderstone home page. This allows three
different types of searches, depending on which "submit" button the user
clicks (each has a different value). Does this work with Webinator or just
the full-blown versions of the Texis software?

<form method=get action="/texis/demos/homesearch/main.bin">
<input size=35 name=arg>
<input type=submit name=what value="The Web">
<input type=submit name=what value="The News">
<input type=submit name=what value="Thunderstone">
<input type=hidden name=defcmd value=find></form>


- Seth!



User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

value=

Post by Thunderstone »



Yes, webinator can do that, but it's probably not quite what you want.
That script doesn't actually search anything, it just redirects you
to the correct search based on your choice. Here's a partial excerpt:

<header name=Content-Type value=text/html>
<SWITCH $what>
<CASE "Thunderstone">
<strfmt "/texis/webinator/thunderstone/?query=%U\n" $arg>
<CASE "The Web">
...
<DEFAULT>
...
</SWITCH>
<header name=Location value=$ret>

If you want to search a different database based on the user's choice,
like http://www.thunderstone.com/jump/Search.html does, just make
a radio button called db with the desired db settings. See the form
in the source of the above url for how to make a radio button.





kgrayburn
Posts: 7
Joined: Wed Jun 06, 2001 8:13 am

value=

Post by kgrayburn »

In reply to previous correspondence, the script I am looking to compare mine with is the one which generates the page: http://www.thunderstone.com/jump/Search.html

Can a copy be posted onto the message boards or, better still, is it possible to have this script available on the example scripts page?

With kind regards,

Karen
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

value=

Post by mark »

That's an old url (you'll notice that you're redirected to the new location). That search is part of a much larger script that does many different things. The pertinent portions are posted in the messages above.

An example of simply searching multiple databases is a form like this:

<form method=POST action="$url/">
<input type=radio name=db value=db>Everything<br>
<input type=radio name=db value=manuals>Just Manuals<br>
<input type=radio name=db value=tech>Just Tech Support<br>
Find: <input name=query value=""><input type=sumit value="Search">
</form>

The above assumes you have three databases in your webinator directory called "db", "manuals", and "tech".
kgrayburn
Posts: 7
Joined: Wed Jun 06, 2001 8:13 am

value=

Post by kgrayburn »

Are they to be no more changes in the script other than the radio buttons?

Here is an abbreviated version of the script so you can see what I mean:

<A NAME=showform>
<TABLE WIDTH=$TBWIDTH BORDER=0 CELLSPACING=0 CELLPADDING=0>
<FORM METHOD=post ACTION="<!WEM LINK.BASE>/<!WEM LINK.URLONLY>">
<IF $power neq 1>
<$vars = "db" "prox" "rorder" "rprox" "rdfreq" "rwfreq" "rlead" "sufs">
<ELSE>
<$vars = "db">
</IF>
<LOOP $vars>
<getvar $vars>
<IF $ret neq "">
<INPUT TYPE=hidden NAME=$vars VALUE="$ret">
</IF>
</LOOP>
<IF $power neq 1>
<TR><TH ALIGN=RIGHT><FS>Include </FONT></TH>
<TD>
<INPUT SIZE=30 name=query value="$query">
<INPUT TYPE=submit name=submit VALUE="Submit">
<input type=submit name=cmd value="Options">
</TD>
</TR>
<ELSE>
<TR><TH ALIGN=RIGHT><FS>Include </FONT></TH>
<TD>
<INPUT SIZE=30 name=query value="$query">
<INPUT TYPE=submit name=submit VALUE="Submit">
<input type=submit name=cmd value="Hide">
</TD>
</TR>
<TR><TH ALIGN=RIGHT><FS>Exclude </TD>
<TD>
<INPUT SIZE=30 name=notq></TD>
</TR>
<TR>
<TD COLSPAN=2>

<TABLE WIDTH=$TBWIDTH BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR>
<TD VALIGN=TOP WIDTH=100%><mrcbox></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=100% HEIGHT="10"> </TD>
</TR>
</TABLE>

<TABLE WIDTH=$TBWIDTH BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR>
<TD VALIGN=TOP ALIGN="right" height="1" width="85"><b>Sections</b></TD>
<TD VALIGN=TOP>
<input name=db type=radio value=db checked> All MRC<br>
<input name=db type=radio value=about> About MRC<br>
<input name=db type=radio value=public> Public Interest<br>
<input name=db type=radio value=funding> Funding<br>
<input name=db type=radio value=research> Current Research<br>
<input name=db type=radio value=strategy> Strategy<br>
<input name=db type=radio value=comms> Communications<br>
</TD>
<TD VALIGN=TOP height="1" width="50"><b>Funding</b></TD>
<TD VALIGN=TOP>
<input name=db type=radio value=fundresearch> All<br>
<input name=db type=radio value=grants> Grants/Units<br>
<input name=db type=radio value=studentships> Studentships<br>
<input name=db type=radio value=fellow> Fellow Professorships<br>
<input name=db type=radio value=other> Other<br>
</TD>
</TR>
<TR>
<TD VALIGN=TOP HEIGHT="10"> </TD>
<TD VALIGN=TOP HEIGHT="10"> </TD>
<TD VALIGN=TOP HEIGHT="10"> </TD>
<TD VALIGN=TOP HEIGHT="10"> </TD>
</TR>
</TABLE>
</IF>
</TD>
</TR>
</FORM>
</TABLE>
</A>

Do I not have to change the script anywhere else apart from:

<switch $db>
<case "db">
<strfmt "<!WEM LINK.BASE>/<!WEM LINK.URLONLY>/?query=%U\n" $arg>
<case "about">
<strfmt "<!WEM LINK.BASE>/<!WEM LINK.URLONLY>/?query=%U\n" $arg>
.
.
.
</switch>

The reason why I ask this is because the pages are not returned into the search results.

Rgds,

Karen
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

value=

Post by mark »

If all you're trying to do it search different webinator databases on the same machine I would not do the <switch $db> and redirect bit at all. Just set the db in a radio button as you have and remove "db" from the $vars list.
kgrayburn
Posts: 7
Joined: Wed Jun 06, 2001 8:13 am

value=

Post by kgrayburn »

Just to clarify:

In the 'showform' anchor name tag where the code reads:

<IF $power neq 1>
<$vars = "db" "prox" "rorder" "rprox" "rdfreq" "rwfreq" "rlead" "sufs">
<ELSE>
<$vars = "db">
</IF>

Replace <$vars = "db"> with <$vars = "$db">?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

value=

Post by mark »

No. Remove "db" from both $vars lists.

<$vars = "prox" "rorder" "rprox" "rdfreq" "rwfreq" "rlead" "sufs">

<$vars = >