Re: [htdig] restrict

Alain Zürcher (
Tue, 12 Oct 1999 21:11:19 +0200

Fraser Campbell wrote (on 08/23/99!) :

<<Allow user defined (and changeable) restrict:
The problem is that I have created a drop down menu to restrict searches
on site. This sets the restrict to the appropriate site but I would like
drop down menu to appear on the search results pages as well so that people
could simply switch the site selected and click search to perform their
on another web site. Also the drop down would have to display the
selected web site for the search to work right.>>

You can have the drop down menu display the previously selected restrict
with a JavaScript function that you call by onLoad="restrict()" in the BODY
tag, such as :

<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
function restrict() {
 if("$RESTRICT"=="exosPhy/") {
 else {
  if("$RESTRICT"=="exosVoc/") {
  else {
   if("$RESTRICT"=="articles/") {
   else {
    if("$RESTRICT"=="contribu/") {

You can see such a JS function implemented on

| Alain Zürcher, Paris, France
| L'Atelier du Chanteur :

To unsubscribe from the htdig mailing list, send a message to containing the single word unsubscribe in
the SUBJECT of the message.

This archive was generated by hypermail 2.0b3 on Sat Oct 23 1999 - 09:47:49 PDT