beautypg.com

Creating an html form search box, Html code for a form search box – Google Search Appliance Creating the Search Experience User Manual

Page 116

background image

Google Search Appliance: Creating the Search Experience

Advanced Customization Topics

116

3.

For the src attribute of the inline frame tag, specify http://appliance_hostname, where the host
name is the correct value for your search appliance. This value points to the default front end. If you
want to open a different front end, or customize any other query parameters for the search
interface, add them to the URL as shown in the example code.

4.

Optionally, set the frame width and height attributes to make sure the inline frame is large
enough to accommodate the search results page. Add a noresize attribute if you want to prevent
end users from changing the size. You can set any optional attributes of the inline frame (scrolling,
align, and so on.) depending on your design goals for the page.

5.

Save the page.

6.

Perform a test search from the page verify that the search page and results page are displayed
inside the inline frame as expected.

Creating an HTML Form Search Box

With a simple HTML form such as the one depicted in the “HTML Form Example Page” on page 113, you
can integrate a simple search box directly into your web page instead of using the default search page.
This approach allows an end user to focus on the page content with minimal distraction from the search
interface. However, if the user needs to perform a search, the search box is readily available, as shown
below.

HTML Code for a Form Search Box

The HTML code for the search box used in the example is derived from a form tag in the side navigation
of the page.










This form submits a GET request to the search engine, requesting results in the format specified by
example-frontend. The example form includes optional input fields for a submit button and for query
parameters that enhance the visual effect of the page. These parameters turn off duplicate directory
filtering (filter), retrieve meta tag values (getfields), and specify the stylesheet associated with
example-frontend (proxystylesheet).

The requirements for an HTML for search box are:

Specify the GET method and the path http://appliance_hostname/search