BNL Home

Search Form Submission Processing

  1. Search form is submitted by user
  2. Script at /search/ determines if it is a web search or a people search
  3. If it's a web search then the script generates the Google search URL and redirects to the appropriate (internal or external) BNL Google search appliance.

    We can pass terms that would normally be blocked by the URL scanner via a GET request (query string paramaters) because the BNL GSA's are not monitored by the URL scanner.

  4. If it is a people search, then the script at /search/ takes the search form field values and loads them up into a hidden form on the /search/ page and then jQuery triggers that form to submit via the POST method to the BNL staff directory, which is located at http://www.bnl.gov/directory/

    This is the only way we can pass search terms that would normally be blocked by the BNL URL scanner to the BNL Staff Directory application.

Standard BNL Search Forms

 

IMPORTANT: All bnl search forms must have method="post" and action="https://www.bnl.gov/search/" and the main input field must always have name="q1".


Standard BNL Web Search

<form id="XXXX" name="XXXX" method="post" action="https://www.bnl.gov/search/">
	<input id="XXXX" name="q1" type="text" value="" />
</form>

Working Example


BNL Web Search (Restrict to Subcollection)

<form id="XXXX" name="XXXX" method="post" action="https://www.bnl.gov/search/">
	<input id="XXXX" name="q1" type="text" value="" />
	<input name="SUBCOLLECTION" type="hidden" value="CFN" />
</form>

Working Example


BNL Combined Web Search (Subcollection & All of BNL)

<form id="XXXX" name="XXXX" method="post" action="https://www.bnl.gov/search/">
	<input id="XXXX" name="q1" type="text" value="" />
	<input  name="SUBCOLLECTION" type="radio" checked="checked" value="CFN" /> CFN
	<input  name="SUBCOLLECTION" type="radio" value="" /> All of BNL
</form>

Working Example


CFN All of BNL


Standard BNL People Search

<form id="XXXX" name="XXXX" method="post" action="https://www.bnl.gov/search/">
	<input id="XXXX" name="q1" type="text" value="" />
	<input name="SUBCOLLECTION" type="hidden" value="people" />
</form>

Working Example


BNL People Search (Restricted to a Department)

<form id="XXXX" name="XXXX" method="post" action="https://www.bnl.gov/search/">
	<input id="XXXX" name="q1" type="text" value="" />
	<input name="SUBCOLLECTION" type="hidden" value="people" />
	<input name="DIRECTORY_RESTRICT" type="hidden" value="NC" />
</form>

Working Example


Combined Search (Web and People)

<form id="XXXX" name="XXXX" method="post" action="https://www.bnl.gov/search/">
	<input id="XXXX" name="q1" type="text" value="" />
	<input  name="SUBCOLLECTION" type="radio" checked="checked" value="" /> Web
	<input  name="SUBCOLLECTION" type="radio" value="people" /> People
</form>

Working Example


Web People