I'm trying to modify the Google search form embedded in one of our XSL templates so that there is a radio button toggle to search the "Website" using Google or our XML "Faculty" directory with a PHP script. I have the Google code snippet:
<form id="SearchForm" action="{ou:pcf-param('search-results')}"
name="SearchForm">
<div class="input">
<input type="hidden" name="cx"
value="002701515966235043044:1yabqrtsqse" />
<input type="hidden" name="cof"
value="FORID:11" />
<input id="main-search" name="q"
type="text" placeholder="Search"/>
<button class="btn" id="search-focus-
last" type="btn" aria-label="Search"></button>
</div>
</form>
<script type="text/javascript" src="http://google.com/coop/cse/brand?form=searchbox_002701515966235043044%3A1yabqrtsqse"></script>
but am unsure how to modify it to allow for the additional behavior. I was going to add a fieldset after the /div:
<fieldset id="context-select">
<legend class="sr-only">Choose to search:</legend>
<label><input type="radio" id="context-website" name="searchterm"
value="website" checked="yes" /><span style="font-weight:normal;font-
size:medium">Website</span></label>
<label><input type="radio" id="context-directory" name="searchterm"
value="catalog" /><span style="font-weight:normal;font-
size:medium">Faculty Directory</span></label>
</fieldset>
But am unsure where I would place action items for each radio button, etc. Thanks in advance for any help anyone can provide.
Aucun commentaire:
Enregistrer un commentaire