[thelist] site search question

Shashank Tripathi sub at shanx.com
Tue Jul 2 22:26:01 CDT 2002

Hi Meredith,

Sorry sent my last message a little too quick. Here is the full message.

  > I'm looking for a site search script that will yield results with
  > anchors, meaning that when you click on a resulting link, you'll be
  > taken directly to an anchor within an html doc, whether it's halfway
  > down the page or whatever.

You mean these anchors will be generated at run time, based on the search
keywords? If that is what you are looking for, I have been there before and
we settled for highlighting the documents. This is because sometimes the
anchor could be right down at the bottom of a page and navigating to it
will not take the page to the beginning of the keyword.

If you want highlight AND anchors, which is interesting, then the same code
that is used for highlighting the text in a page dynamically based on
(regexp most likely) can be used to make dynamic anchors as well.

Basically, onLoad of the document, you would change the location.href to
something like "this.html#anchorname" instead of "this.html". The
"anchorname" was dynamically generated while drawing the page.

But, how about if there are more than one mentions? Is there a way for them
to navigate to the next anchor? This is where highlighting for instance is
very useful.

You can download any freebie search engine script and try this on. For
instance, of you use PHP, mnogoSearch (http://www.mnogosearch.org/)...

Hope this is useful,

More information about the thelist mailing list