Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(Creating an Autocomplete Form) Create a simple search form using a search input

ID: 3558723 • Letter: #

Question

(Creating an Autocomplete Form) Create a simple search form using a search input element in which the user can enter a search query. Using the Firefox web browser, test the form by entering January and submitting the form. Then enter a J in the input element to see previous entries that started with J--January should be displayed below the input element. Enter June and submit the form again. Now enter a J in the input element to see previous entries that started with J--January and June should be displayed below the input element. Try this with your own search queries as well.

Explanation / Answer

Search Form

The code below makes up the search form. Copy this into your web page and insert the search URLs from your list as the option values, one search engine for each option.

<form name="searchform">
Search:
<select name="sengines">
<option value="http://www.google.com/search?q=" selected>Google</option>
<option value="http://www.altavista.com/web/results?q=">Alta Vista</option>
<option value="http://www.dogpile.com/info.dogpl/search/web/">Dogpile</option>
<option value="http://search.yahoo.com/search?p=">Yahoo!</option>
</select>
For:
<input type="text" name="searchterms">
<input type="submit" name="SearchSubmit" value="Search">
</form>

Search Form Guidelines

The following suggestions can assist you as you plan the number and type of search forms to provide at your site.