Referencing the IDQ Script

To post the contents of a form field to an IDQ file, you reference the IDQ file in the <FORM> section of an HTML page. Optionally, you can supply the contents of a form's controls in the HREF argument of an <A> tag. In the illustration that appears in the section "Index Server in Action", the following code is used to create the text box and buttons (we've omitted the server address from the ACTION tag for clarity).

<FORM ACTION="wrox_idx.idq" METHOD="POST">
Enter the contents of a document to find:<P>
<INPUT TYPE="TEXT" SIZE="70" MAXLENGTH="70" NAME="CiRestriction">
<INPUT TYPE="SUBMIT" VALUE="Search Now">
<INPUT TYPE="RESET" VALUE="CLEAR">
</FORM>

Two things in this code are worthy of note. First, the HTML form defined here does not post to a CGI or ASP script. It posts to an IDQ file, which defines the elements of the query that will be built around the user-supplied text. Second, note that the CiRestriction name we assign our text form field identifies for the IDQ file the field that contains the text that we're looking for.

© 1998 by Wrox Press. All rights reserved.