Search Box

The code below has been updated for Primo VE!

Libraries wishing to add a OneSearch search box to their websites are encouraged to do so. It is a simple widget:

 

Please use the following code, customizing it for your library:

<!-- If you have more than one OneSearch box on a single page, change the form name for each so it is unique -->
<!-- Replace "xx" in the form action with your 2-letter campus code in lowercase letters -->
<form id="simple" name="searchForm1" method="get" target="_blank" action="https://cuny-xx.primo.exlibrisgroup.com/discovery/search" enctype="application/x-www-form-urlencoded; charset=utf-8" onsubmit="searchPrimo()">
<!-- Customizable Parameters -->
<!-- Below, replace "XX" with your 2-letter campus code in uppercase letters -->
<input type="hidden" name="vid" value="01CUNY_XX:CUNY_XX">
<input type="hidden" name="tab" value="Everything">
<input type="hidden" name="search_scope" value="IZ_CI_AW">
<input type="hidden" name="mode" value="basic">
<!-- Fixed parameters -->
<input type="hidden" name="displayMode" value="full">
<input type="hidden" name="bulkSize" value="10">
<input type="hidden" name="highlight" value="true">
<input type="hidden" name="dum" value="true">
<input type="hidden" name="query" id="primoQuery">
<input type="hidden" name="displayField" value="all">
<!-- Include below ONLY if "Expand My Results" is enabled by default in your instance -->
<input type="hidden" name="pcAvailabilityMode" value="true">
<!-- End "Include below..." -->
<input type="text" id="primoQueryTemp" value="" size="35">
<input id="go" title="Search" onclick="searchPrimo()" type="submit" value="Search" alt="Search">
<script type="text/javascript">
function searchPrimo() {
    document.getElementById("primoQuery").value = "any,contains," + document.getElementById("primoQueryTemp").value.replace(/[,]/g, " ");
    	/* If you changed the form name at the top, change it below to match */
    document.forms["searchForm1"].submit();
}
</script>
</form>

Replace xx with your 2-letter Aleph OWN code in lowercase letters. Replace XX with your 2-letter Aleph OWN code in uppercase letters. Capitalization matters! For more options and the ability to create custom HTML code for the OneSearch widget, see http://ols.cuny.edu/onesearch.