How do I make a "Search" field on plain .htm page to search Index Server

Posted on 2007-08-08
Last Modified: 2013-12-09
I have a plain old .htm web page with a FrontPage "webbot" search field on it that searches my Microsoft Index Server and returns correct results, within limits.  It works just fine when searching for a single word.  Multiple words are treated as exact phrases unless you put a "&" in between each word.

So I'm looking for something better.  I've searched for days looking for a solution that's easy enough to put on a web page that I don't have to learn a new programming language to implement it.

I found some rather long code examples in C#.  I don't speak C#.  I've only just started to learn VB 2005.

Is there no javascript search or anything?  This seems like it's way more difficult than it should be.
Question by:megnin
    LVL 1

    Accepted Solution

    LVL 1

    Author Comment

    Well, that doesn't use Index Server, which is a requirement.  I have a catalog set up with an index of a single directory of files.  Those files are the only files that are to be searched.  I don't want to search my entire intranet or the Internet, just 84 files in said directory.

    This "webbot" came from FrontPage 2000 and works except that multiple words must be separated by "&" characters or they are treated as an exact phrase, even with no quotes:

    <!--webbot bot="Search" S-Index="All" S-Scope="DOCS/Policies"
    S-Fields="timestamp,DocumentK,weight," @"rank,docauthor,doccomments,docsubject,doctitle,filename"
    S-Text="Search for:" I-Size="40" S-Submit="Start Search"
    S-Clear="Clear" S-TimestampFormat="%m/%d/%Y" S-CiMaxRecordsPerPage="10" S-CiMaxRecordsInResultSet="100"
    TAG="BODY" b-useindexserver="0" S-FieldsEx="rank,docsubject," startspan -->
    <form action="_vti_bin/shtml.dll/policies.htm" method="POST">
    <input type="hidden" name="VTI-GROUP" value="0">
    <p><b>Search for: </b><input type="text" name="search" size="40" value=""> Separate multiple words with "&" characters except for exact phrase. </p>
    <p><input type="submit" value="Start Search">
    <input type="reset" value="Clear"></p>
    <!--webbot bot="Search" endspan i-checksum="38253" -->
    LVL 1

    Author Comment

    Sorry for the "B" grade, el79.  I did specify I wanted to search using my Index Server and gave you over 24 hours to respond again.  I though a "C" was a bit harsh even though all the criteria was met for a "C"...

    C: If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information, or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option.
    (Note: The use of a C in a vindictive manner is likely to be changed by a Moderator.)  

    I am still using the webbot above for lack of anything better and have just added some instructional text next to the button:  "Separate multiple words with "&" characters except for exact phrase."

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
    This video teaches users how to migrate an existing Wordpress website to a new domain.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now