Setting Up the Form (.Htm File)

The following example shows a basic query form:

To create a basic query form as in the example
  1. Type the following HTML code in a file.
  2. Save the file in HTML format. (Some lines are shown in bold for emphasis only.)
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN" "html.dtd"> 
<HTML> 
<HEAD>
    <TITLE>Index Server Search Form</TITLE>
</HEAD> 
<BODY> 
<FORM ACTION="ixtourqy.idq" METHOD="GET"> 
Search for: 
<INPUT TYPE="TEXT" NAME="CiRestriction" SIZE="30" MAXLENGTH="100" VALUE="">
<INPUT TYPE="SUBMIT" VALUE="Execute Query">
<INPUT TYPE="RESET" VALUE="Clear"> 
</FORM> 
</BODY>
</HTML>

The two most important lines of HTML code are:

<FORM ACTION. . .>
Tells where to find the .idq file that goes with this form. Because an .idq file helps process an Index Server query form, every Index Server query form must specify a corresponding .idq file.
<INPUT TYPE=“TEXT”. . .>
Defines a variable called CiRestriction. This variable is preset to accept whatever text is typed into the query field (the Search for field, in the example). For example, if you type cache in this field, CiRestriction holds the text cache.

When the Execute Query button is clicked, the data in the text field is sent to IIS and processed. IIS finds the specified .idq file and passes the query data (cache in the example) and the .idq file to Index Server. To learn how to construct complex queries, see Query Language.


© 1997 by Microsoft Corporation. All rights reserved.