What code do I use to embed a journal search on my library's website, in our LibGuides, etc.?
Use the following code to update the journal search widget on your library's website, LibGuides, etc.:
<form class="SearchPrimoJournal" method="get" name="searchForm" target="_self" action="https://cuny-xx.primo.exlibrisgroup.com/discovery/jsearch" enctype="application/x-www-form-urlencoded; charset=utf-8" onsubmit="searchPrimo()" id="searchPrimoFormJournal">
<label for="primoQueryTemp">Search for Journals</label>
<input type="text" id="primoQueryTemp" value="" placeholder="Find journals by title or ISSN">
<!-- Customizable parameters -->
<input type="hidden" name="vid" value="01CUNY_XX:CUNY_XX">
<input type="hidden" name="tab" value="jsearch_slot">
<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">
<input value="Search" title="Search OneSearch" alt="Search" type="submit" onclick="addPrimoQuery();" />
</form>
<script type="text/javascript">
function addPrimoQuery() {
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["searchPrimoForm1"].submit();
}
</script>
Replace xx and XX with your 2-letter campus code in lowercase and uppercase letters, respectively.