Jump to main content.


Coding the Search Box

Screen shot of the search results page.

The search engine code in template 3 provides the choice of searching an area or the entire EPA site. By editing the code where indicated, the search results page includes the area name and contact us link for the area being searched. The results page also provides a link for an advanced search.

The search code in the unedited template looks like this:

<!-- START SEARCH CONTROLS -->
	<form id="EPAsearch" method="get" action="http://nlquery.epa.gov/epasearch/epasearch">
		<!-- START AREA SPECIFIC LINKS AND SEARCH BOX  -->
		...
			<span class="search"><strong>Search:</strong>
			<input name="typeofsearch" id="EPAall" type="radio" value="epa"/><label for="EPAall">All EPA</label>
			<input name="typeofsearch" id="Areaall" type="radio" value="area" checked="checked" /><label for="Areaall">This Area</label>
			<input name="querytext" id="searchbox" value="" />
			<input name="submit" id="searchbutton" type="submit" value="Go" />
			<input type="hidden" name="fld" value="YOUR TSSMS HERE" />
			<input type="hidden" name="areaname" value="AREA NAME HERE" />
			<input type="hidden" name="areacontacts" value="AREA CONTACT US LINK HERE" />
			
			<!-- AREA ADVANCED SEARCH URL HERE (OPTIONAL) -->
			<input type="hidden" name="areasearchurl" value="" />
			<!-- THE REMAINING HIDDEN INPUTS ARE USED BY THE SEARCH ENGINE - DO NOT EDIT -->
			<input type="hidden" name="result_template" value="epafiles_default.xsl" />
			<input type="hidden" name="filter" value="samplefilt.hts" /></span>
		</p>
	</form> <!-- END SEARCH CONTROLS -->

To edit the search code for your specific set-up, please select a link below.


Example Code for Searching a Single TSSMS Area (Topic/Area = one TSSMS)

To search a single TSSMS area, edit the search engine code as indicated in bold. Here we use OWOW as an example:

[snip]
			<input type="hidden" name="fld" value="owowwtr1" />
			<input type="hidden" name="areaname" value="Wetlands, Oceans & Watersheds" />
			<input type="hidden" name="areacontacts" value="http://www.epa.gov/owow/contact.html" />
[/snip]

Note: The link to your "Contact Us" page must be an absolute link. Reference the entire URL.

Top of page


Example Code for Searching Several TSSMS Areas (Topic/Area = more than one TSSMS)

To search multiple TSSMS areas, edit the search engine code as indicated in bold with your own TSSMSs.

Using NERL as an example:

[snip]
	<input type="hidden" name="fld" value="nerlpage,nerlesd1,nerleerd,heasdweb,asmdnerl,nerlcwww,mrlcpage,chadnet1,extrmurl,hedswebm" />
	<input type="hidden" name="areaname" value="Exposure Research" />
	<input type="hidden" name="areacontacts" value="http://www.epa.gov/nerl/comments.html" />
[/snip]

Note: The link to your "Contact Us" page must be an absolute link. Reference the entire URL.

Top of page


Example Code for Searching Sub-directories Within a TSSMS

To search sub-directories within a TSSMS area, edit the search engine code as indicated in bold. Add your own TSSMS and sub-directory.

Using epafiles as an example:

[snip]
	<input type="hidden" name="fld" value="adminweb" />
	<input type="hidden" name="url_directory" value="epafiles" />
	<input type="hidden" name="areaname" value="EPA Web Design" />
	<input type="hidden" name="areacontacts" value="http://www.epa.gov/epafiles/contactus.htm" />
	<input type="hidden" name="areasearchurl" value="" />
	<input type="hidden" name="result_template" value="epafiles_default.xsl" />
	<input type="hidden" name="filter" value="sample3filt.hts" />
[/snip]

Note: The link to your "Contact Us" page must be an absolute link. Reference the entire URL.

Top of page

For help with these pages, contact the Web Redesign Workgroup.


Local Navigation


Jump to main content.