Re: [htdig] Dummies Guide to Restricting searchs


Subject: Re: [htdig] Dummies Guide to Restricting searchs
From: Terry Collins (terryc@woa.com.au)
Date: Wed Nov 15 2000 - 23:57:29 PST


David Robley wrote:

> > I changed action to read
> > action="/cgi-bin/htsearch?config=&restrict=/lists/slug" but it instantly
> > drops the restriction off the form.
> >
> > Is this the way to do it?
> > Can anyone tell me why the restriction is dropped?
>
> You could add, in your search form, a drop down list, named restrict,
> containing the various values of restriction you want. There are examples
> of the drop down lists, using the SELECT tag, in the search.html that comes
> with htdig.

Thanks David

I had a look at that and thought "poop" I just want to feed them the
value", then the brain fired up and said "go to the book shelf and look
at your html books dummy" I now know a little bit about forms and have
something working.

This is what I have entered for the part
<UL>
        <LI><IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A
HREF="1998/index.html">1998/</A>
        <LI><IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A
HREF="1999/index.html">1999/</A>
        <LI><IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A
HREF="2000/index.html">2000/</A>
        <LI><form method="get"
action="/cgi-bin/htsearch?config=&restrict=/lists/slug/">
                <P>Search The SLUG list archive:
                <input type="text" size="30" name="words" value="">
                <input type="hidden" name="restrict" value="/lists/slug">
                <input type="submit" value="Search"></p>
                </form>

</UL>

I don't know if putting type=hidden is the right way to do it, but it
works and the restrict is kept for subsequent searches. If someone knows
a better way, I'd like to know.

The O'Reilly HTML book isn't too clear, or perhaps I haven't fathomed
their jargon. The book does mention that you can do it as I was (as part
of the action) but warns that the & character has a special meaning and
will be re-interpreted and you should useeither &#38 or &amp instead.

Thanks all

--
   Terry Collins {:-)}}} Ph(02) 4627 2186 Fax(02) 4628 7861  
   email: terryc@woa.com.au  www: http://www.woa.com.au  
   WOA Computer Services <lan/wan, linux/unix, novell>

"People without trees are like fish without clean water"

------------------------------------ To unsubscribe from the htdig mailing list, send a message to htdig-unsubscribe@htdig.org You will receive a message to confirm this. List archives: <http://www.htdig.org/mail/menu.html> FAQ: <http://www.htdig.org/FAQ.html>



This archive was generated by hypermail 2b28 : Thu Nov 16 2000 - 01:05:34 PST